Measurability for discrete measure Let $(X,\mathcal{B},\mu)$ be a measure space with discrete measure $\mu$ and Borel sigma-algebra. Why can we claim that all real functions on $X$ are measurable?

Strictly speaking, it is not true. In fact, measurability of a function does not  depend on the measure $\mu$, it depends only on its sigma-algebra (i.e. family of measurable sets).
For example, take Borel sigma-algebra on $\mathbb R$, and define $\mu(X) = 1$ when $0 \in X $ and $\mu(X) = 0$ otherwise. The measure $\mu$ is discrete, but indicator function of any non-Borel set is not measurable.

However, it is easy to see that any discrete measure $\mu$ can be extended to the family of all subsets of $X$. I.e. you can extend your discrete measure to $\mathcal M = 2^X$. Just define $\mu(A)$ as a sum (at most countable) of all the masses for all the peaks in $A$. It should be easy to check that $\mu$ is really a measure, due to the fact that you can change the order of summation in a countable sum of nonnegative numbers as you wish.
So, you can always consider a discrete measure on a sigma-algebra of all subsets. In this case all sets are measurable, so all functions are measurable too.
