Wearing rubber gloves while cleaning your toilet is not required but it's recommended to keep the chemicals and germs off your hands.
I always wear gloves when cleaning my own toilet just to keep my hands clean and sanitary and prevent the toilet cleaner from getting onto my hands.
The germs also stay off my hands by wearing rubber gloves which is also a good thing to prevent catching any other diseases that someone might have when they used your toilet.
If you're cleaning public toilets you certainly really do need to wear rubber gloves to prevent diseases from getting onto your hands and I used to clean toilets publicly and wore rubber gloves all the time then and wearing the rubber gloves just became a habit which is one reason I wear rubber gloves when cleaning my own toilet now.