I'm not sure if this applies to all carriers but with many carriers if you are on wifi you can send/receive text messages and sometimes even make calls. Certainly you could use WhatsApp or similar in that case.
How would you propose that those messages get routed if there is no connection to either the internet nor a cell provider?