An evaporator drain tube routes water condensation out of the vehicle. As the A/C cools warm cabin air, moisture condenses on the cold evaporator fins, just like water on a cold soda can. This water drops into the bottom of the HVAC plastic box and flows through the drain tube, which exits through the firewall near the bottom of the engine bay or transmission tunnel. You should see a small puddle of water under your car after parking on a hot day.
If this tube gets plugged by dirt, leaves, or spiders, the water has nowhere to go. It fills the HVAC case and eventually spills out onto the passenger carpet. This leads to musty odors and ruined electrical modules. You can clear the blockage by blowing low-pressure air up through the exit tube from under the vehicle.