There is not always a hook in the bathroom stall to hold your purse. But, putting it on the floor is not a good option.
The floor in a public bathroom is full of the worst
germs, and these germs get on the bottom of your purse. Later, you may
put your purse on the kitchen counter, the dining room table, your
couch, etc., and also the germs the purse carries.
In a restaurant, the purse often goes under the table,
kept safe near your feet.