Why is the kanji for gentleman “male child”?

being 男子 (danshi), with the female equivalent being 女子 (joshi) – as often seen on toilets.

I have no idea, but it does seem to be part of a broader pattern because the other thing you could literally translate as “male child” (男の子 – otoko no ko) also seems to be used much more widely than the actual word for child (子供 – kodomo).