The reason they’re dangerous to swallow is because they often contain strong alkalis, acids and phosphates, which are corrosive, and irritant. So it makes them great for cleaning carpets or washing your clothes in, but definitely no good for our skin or inside our body!
Getting washing powder detergent in your eye would make it very red and sore, because it can burn your eye and eyelid. Swallowing these chemicals can also change the pH (the level of acid and alkali) inside your body, which normally is pH 7 for healthy humans. It would also burn the inside of your throat as it goes down!
If you got some in your eye, the best thing to do is run cold water over your eye for at least 15 minutes to get rid of the chemicals. Shampoo and shower gel are much less corrosive than washing powder though, so you’d have a painful eye for a while but it wouldn’t be too bad!
But if you did swallow some, you would probably be told to drink some water (which would dilute it and make it less corrosive), and then call the doctor/hospital immediately.