Why do tanning beds give you skin fungus?

Fungus and tanning. Tanning beds themselves do not contribute to fungal infections. Its more likely that someone ahead of you had something and the cleaning before you went in wasn't that clean.
See below. If the person using the tanning bed prior to you had a fungus infection and deposited an infected skin scale on the bed, the fungus could be transmitted to your skin.