Have you read the paragraph in question (§183 StGB)?
A man = not a woman.(1) A man who annoys another person by an exhibitionist act shall be liable to imprisonment not exceeding one year or a fine.
Weird because we also have this in our basic law:
(1) All persons shall be equal before the law.
(2) Men and women shall have equal rights. The state shall promote the actual implementation of equal rights for women and men and take steps to eliminate disadvantages that now exist.
(3) No person shall be favoured or disfavoured because of sex, parentage, race, language, homeland and origin, faith, or religious or political opinions. No person shall be disfavoured because of disability.