How come any number $m$ that is not a multiple of the primes $p$ or $q$, when raised to the power $(p-1)(q-1)$ and divided by $pq$, always has the remainder $1/(pq)$?
I'm trying to understand it in a simple way. For example:
$p = 3$, $q = 5$ ($p$ can't be the same as $q$, why?)
$m \neq 3k \text{ or }5k$
Let's say we pick $m = 2$.
$$2^{(3-1)(5-1)} / (3\cdot5) = 256 / 15 = 17 + 1/15$$
You mention Euler's theorem in the title of the question; maybe you're not familiar entirely with what it says, but it gives exactly what you're looking for (Wikipedia article).
When $m=pq$ for distinct prime numbers $p$ and $q$, we have $\varphi(m)=\varphi(pq)=(p-1)(q-1)$, and also $\gcd(a,m)=\gcd(a,pq)=1$ is true precisely when $a$ is not a multiple of either $p$ or $q$.
Euler's theorem works perfectly well when $m$ is not a product of distinct primes, but the totient function $\varphi$ just acts differently. For example, if $m=p^2$ for some prime $p$ (i.e., a product of primes that are not distinct), then $\varphi(m)=\varphi(p^2)=p(p-1)$, and the result is that for integers $a$ with $\gcd(a,m)=\gcd(a,p^2)=1$, we have $a^{p(p-1)}\equiv 1\bmod p^2$.