Actually, it's extremely common for kids that age to put stuff in their mouths. That's the whole point though, isn't it? If this child is one who does still explore the world through her mouth, then surely the mother knows this and she should be vigilant in situations like this where they are in an unfamiliar place. After all, people put all kinds of things in their bathrooms aside from the usual soap, TP & towels. Candles are common, perfume bottles, air fresheners, etc.
Again, if Mom turned her head for a second and the kid put the soap in her mouth, well, these things happen. But to imply that it was the OP's fault for having soap in her bathroom in the first place, or for the OP to think that she somehow has to anticipate all the items in her house that might potentially end up in the kid's mouth is over the top.