One thing I don't understand stand that why jammer cannot be used as ESM?
As long as it's a TR module, it can perform ESM. But whether it actually does that is just speculation, because the aircraft will obviously have dedicated receivers for the same.
The issue with older tech is when an antenna is transmitting, it cannot receive. You can only do one or the other. This was how it worked for decades. So, when jamming, you obviously need the receiver receiving the signal without interruption for the suite to create new jamming signals, so you can't use the same antenna for both functions.
Today we have STAR antennas which can simultaneously transmit and receive. So it is possible for a jammer to perform both functions at the same time, but there could be some kind of interference or negative effect when doing this.