Why would the dentist tell me to rinse my mouth with warm salt water?

Swelling. It sounds like you may have some swelling or they anticipate you having some swelling in the future.
Healing effect. Warm salt water can have a healing effect on gum issues for several reasons. Puffy gums can benefit from something called osmosis which causes water to be pulled out of the soft tissue, reducing the puffiness. Also, just the cleaning action of the rinse helps.

Related Questions

I had a tooth pulled 2 days ago. For how many days do I have to rinse my mouth with salt water?

Up to one week. Each extraction may require differnt post op care but in general you should rinse till you feel like no food is laying in the extraction site after eating. In general 5 to 7 days is good.
Varies. If you had an upper tooth removed, a few days would be fine, but if you had a lower tooth removed, where gravity tends to cause food debris to become trapped, I would use the salt water rinse for as long as a week.

What can I do for a tooth ache when I can't get to a dentist tonight? Have already tried warm salt water rinse and anbesol

Wrong Attempts. 1) get on an antibiotic like amoxicillin. 2) take 1-aspirin + 1-tylenol. 3) get to a dentist as soon as able. 4) your attempts do not work because they do not properly address the probable infection and associated pain.
Advil/tylenol. If you alternate 200 mg advil or Ibuprofen with 2 extra strength tylenol (acetaminophen) you will have very good pain control until tomorrow. Please see your dentist as soon as possible because pain is often a sign of infection.
Control infection. Nothing is going to fix this until you see dentist to control the infection. Until then try advil, (ibuprofen) but get to your dentist asap. Pain is signal that there's something drastically wrong.

When dealing with pulled teeth, they say rinse with warm salt water. What does salt water actually do? It still burns like crazy either way.

It burns. And that's about it water or a much lower 'normal' saline flus is all it would need.
Salt is antiseptic. A salt water rinse helps fight infection. You should not rinse out the day of the surgery to prevent loss of the blood clot that should be forming in the extraction socket.