Burst flexi hose, failed hot water system, overflowing washing machine. The classic Rocky carpet soakers. Act in the first day and the carpet usually survives. Wait, and it usually doesn't.
Carpet is the visible layer of a sandwich: carpet on top, underlay in the middle, slab or timber underneath. Towels and household fans dry the top layer while the underlay keeps holding water like a sponge. In Rockhampton humidity, that trapped moisture starts the mould clock within about 48 hours and delaminates the carpet backing not long after. Professional drying works the whole sandwich. Vacuum extraction pulls the bulk water out, moisture meters establish how far it spread, then air movers and dehumidifiers finish the job to measured dryness rather than "feels dry".
Usually, yes, provided the water was clean (a supply line or hot water system) and extraction starts quickly. In-place drying can often save both carpet and underlay. If the water sat for days, or came from a drain or from outside, the underlay typically gets replaced and the carpet becomes a judgement call based on contamination. Either way you'll get a straight answer on site, along with the moisture readings and photos your insurer will want if it becomes a claim.