The first puzzle could be answered by the trunk and branch plumbing configuration that most homes have. There is a large pipe that runs through the entire building while there are some pipes that branch off of it which are connected to individual household and fixtures. If a toilet is flushed, an amount of cold water will go into a small pipe. To keep the pressure in the large pipe balanced, the cold water that goes into the shower water will be decreased, and thus the shower can get extremely hot.
The attack of the shower curtain, or someone calls the shower-curtain-effect, can be explained by Bernoulli's Principle.
According to Bernoulli's Principle:
if we look at both sides of the shower curtain:
When I turn on the hot water, the heat from the water will push the air molecules to move faster. According to Bernoulli's Principle, if the speed of the molecule increases, the pressure will decrease. Since the speed of the air molecules doesn't change on the other side of the curtain, if v1 increases, P1 decreases.
Before I turn on the hot water
P1 < P2
So the higher pressure will push the curtain towards the side where the pressure is lower, and the shower curtain will attack.