Why does humidity in the houses make clothes mildew? Is there any method for protection?
This isn't chemical, it is biological. Mildew is a fungus, and fungi like moist, dark places. The high humidity simply facilitates the growth of the fungus.
If the moisture in the home is originating as steam from the shower, and perhaps kitchen cooking, then vent the bathroom & steam to the exterior and keep the bathroom door closed until moisture subsides. If the climate allows it, keep one or two windows open at most times so that moisture from your breath doesn't get a chance to condense on the cold walls and windows.
Fungus, mould and mildew, thrives in warm, humid, spaces.
I think it is not related both of the reasons you think but it is related to how a house is built. The origin of moisture is walls of the house and floort and there is less moisture in the bathroom than some walls of the house.
Separate names with a comma.