Wet carpet should be vacuumed with a wet/drying method before using a dry vac. For example, use a vacuum cleaner with the hose attachment that has a water droplet nozzle. This will help to clean the dirt and debris off of the carpet and make it easier to vacuum.
If you vacuum up water, the air pressure inside the vacuum cleaner will be greater than the atmospheric pressure outside the vacuum cleaner. This causes liquid water to escape from the vacuum cleaner and onto your floor.