This is true if the measure space is complete, that is if every subset of a measurable set with measure zero is measurable too.
In general, it can be that you have a measurable set $N$ with $\mu(N)=0$ and a nonmeasurable set $M\subseteq N$. If a property holds exactly for the elements of $X\backslash M$, it also holds for every element in $X\backslash N$ and therefore almost everywhere, but the set of elements on which it holds, $X\backslash M$ is not measurable.
Although the comments more or less answer the question, and the question is a few years old, some readers might benefit from a complete answer.
Here is another way to think about the concept. "Almost everywhere" means some proposition/property is true everywhere except a set of measure zero. So if $f=g$ a.e. this means the following.
Let $f,g:X\rightarrow Y$ and let $E\subset X$ with $\mu(E)=0$. If $f=g$ on $X\setminus E$ and $f\neq g$ on $E$ then $f=g$ a.e.
Note that here, we did not assume the Lebesgue measure, or that we are even dealing with domains which are subsets of $\mathbb{R}^n$.
Here are some good examples of what can "go wrong" with functions equal almost everywhere. For simplicity, let's consider the Lebesgue measure on $\mathbb{R}$
$(1)$ Let $D(x)$ denote the Dirichlet function, where $D(x)=0$ if $x$ irrational and $D(x)=1$ if $x$ is rational. Now consider the zero function $f(x)=0$. Note that $f=D$ almost everywhere, since $\mu(\mathbb{Q})=0$ and $f\neq D$ only on $\mathbb{Q}$.
So even if two functions are equal almost everywhere, one can be continuous everywhere and the second one can be nowhere continuous.
$(2)$ Cantor's function is constant a.e. but monotone increasing.
$(3)$ Define $g(x)=0$ if $x$ irrational and $g(x)=x$ if $x$ is rational.
$g(x)$ is bounded a.e. but not globally bounded.
In addition, you can show two functions in $L^2$ are equal almost everywhere if you can show their Fourier series and/or Fourier transforms are equal almost everywhere.
There are countless of other such examples.
Best Answer
Well, to make things more messy I would say that $\mu$-a.e. results are $\mu$-relatively strong. Namely, such results do not hold on sets of very small important (of $\mu$ measure zero). It all depends on the measure $\mu$ in the end, and on how do you rely upon it. Namely, measures are weights that tell you what is more important and what is less.
If you know that
then it gives you a pretty nice characterization of those functions that are Riemann integrable. Indeed, you have both a cool intuition that such functions does not have to be very weird (their set of weirdness $D(f)$ is "small enough") and you have a working criteria to check integrability in all particular cases.
If you know that
you will think, that simulating a trajectory of such process with exact random number generator will be successful in your whole entire life.
However, in case you are able to show that something holds $\delta_x$-a.e. where $\delta_x$ is a Dirac measure (a point mass) at a single point $x$, this is not a very useful result usually. Indeed, it tells you that some property holds at a point $x$ and does not give you any further information. Agree?
Well, as I mentioned above it's all relative and in fact some single point $x$ may be more important for you then the rest of the state space. For example,
Here the measure $\psi$ tells us which sets are "big enough" w.r.t. the dynamics of a Markov Chain. Namely, which sets, no matter where do you start from, you'll visit with a positive probability. Such sets however do not have to be "big" in our usual understanding. Namely, it may happen naturally happen for some probabilistic models that $\psi(\{0\}) = 1$ and $\psi(\Bbb R\setminus \{0\}) = 0$. Does it mean that the singleton set $\{0\}$ is bigger than $\Bbb R\setminus \{0\}$? Relatively, yes - under these particular conditions the behavior of a process at $\{0\}$ determines the whole asymptotic behavior of it.
Hope, these examples help.