How can we say charger's output is 5V and 2.1A without giving resistance?
That's not what that means.

A current rating of 2.1A means that the charger can support a max current of 2.1A. But it doesn't mean that it needs to output that at all times. It can just as easily output 1A or 0.5A.

Some chargers have a minimal output current required to stay active (like battery packs sometimes) or they shut down usually on the order of 50mA.