First of all, an encryption scheme must have the correctness requirement $$Dec_k (Enc_k (m)) = m$$ In other words, whatever data you encrypted, you must get it back after the decryption. Otherwise, there is no use.
In RSA, we have the relation between public exponent $e$ and private exponent $d$ $$e \cdot d = 1 \bmod \varphi(N)$$ where $\varphi(N)= (p-1)(q-1)$, with $\varphi(N)$ is the Euler's Toitent function.
From Euler theorem we know that $a^x = x^{x \bmod \phi(n)} \bmod N$. This help to calculate the power faster $$M^{ed} \bmod N \equiv M^{ed \bmod \varphi(N)} \bmod N$$
$(M^e \bmod N)^d \bmod N = M^{ed} \bmod N $
To see this, we can use the modulus property $a \equiv b \bmod n$ then there is $k \in \mathbb{Z}$ such that $ a = b + nk$.
With $M^e = t \bmod N$ we have $M^e - N\cdot k = t$ and then with $(M^e - N\cdot k)^d \bmod N$. If we expand the power this simplifies $$M^{ed} \bmod N$$ since, except this term, all others will vanish as they contain at least one $N$.
So, we don't care it is small or not during the calculation, it satisfies the correctness requirement.
Note: For TextBook RSA the small $e$ can make big problems like in the case $e=3$ (enables fast encryption or signature verification), this is commonly known as the cube-root attack. In practice, however, the textbook RSA is not used. It must be used with proper encryption paddings like PKCS#1 v1.5 (RSAES-PKCS1-v1_5) or OAEP (RSAES-OAEP). With this padding, there is no problem with using small $e$'s like the common ones. $\{3, 5, 17, 257, 65537\}$. Similarly, for the RSA signature, we have RSASSA-PSS.