A bathroom can be full of satan...
Full of evil and therefore we repeat this verse to keep safe...
Allahumma Inni A'udhu Bika Minal Khubth wal Khaba'ith.
O' My Lord I seek refuge in you from all evil and evil doers.
When we're leaving we are grateful Our Lord provided us that safety and so therefore we repeat the following verse.
Ghufranak wa lakal Hamd wal shukur....
I seek your forgiveness God and i thank you my Lord.
God keeps us safe from all evil and we're given things to say and even if we forget God knows our intention was to ask him to protect us...
This is why its important to keep faith safe solid and clean....