RSA {2} Why RSA must make sure that gcd(e,φ(n))=1

Why RSA must make sure that gcd(e,φ(n))=1gcd(e,φ(n))=1 instead of gcd(e,n)=1gcd(e,n)=1?

By Euler's theorem, if gcd(e,n)=1gcd(e,n)=1, then eφ(n)1(modn)eφ(n)≡1\pmod n. But why does RSA need to make sure that gcd(e,φ(n))=1gcd(e,φ(n))=1?

encode:

medm1m(modn)m^{ed} \equiv m^1 \equiv m\pmod n

But why does this word? Since ed1(modφ(n))ed \equiv 1 \pmod {\varphi(n)}
if gcd(e,d)=1gcd (e, d)\not= 1 then ee and dd are not coprime ,then ed=1(modφ(n))ed \not= 1 \pmod {\varphi (n)}.So ee must be coprime with φ(n)\varphi(n) to have a modular multiplicative inverse.(模反元素)
Also gcd(e,n)1gcd(e, n) \equiv 1, since the public key is presented as (e,n)(e, n). Then you trivially can compute a factor of nn if ee is not coprime.