Why WiFi modules can't listen to remote HTTP requests?
This is not going to be a complete answer, because this whole issue dominates IoT development and is too big to fit here. Instead it's going to be a list of places to start finding the solutions. Put words in bold into your search engine.

The key issue is NAT. This normally makes it impossible to initiate connections into an end-user network, only outbound connections are possible. UDP is supported via "pseudo-connections" which must pass a certain amount of traffic to be kept open. NAT is widely deployed due to shortage of IPV4 addresses.

NAT may apply to Wifi (for devices on consumer premises) or GSM. It's very rare to get a GSM network configured to allow inbound TCP with public IP addresses.

So there are various workarounds. HTTP long polling, where the device connects to a server and leaves the connection open. Systems for opening ports through NAT such as STUN and UPnP.

Lots of IoT systems seem to use MQTT, which wraps some of this stuff up for you.

Another alternative is to deploy IPv6 and get your devices proper publicly routable IPv6 addresses to which inbound connections can be made. However this depends on getting your clients to upgrade their networks.

It's worth looking for teardown or reverse engineering of existing devices, such as a coffee machine (LAN only, not available from work - so it doesn't address the inbound connection issue of your question at all) or lightbulbs (disastrously insecure).