Its uncommon to have a MxF shower arm, but there were some made by companies like Symmons and I have one on the shelf by Kohler.
Likely the fitting in the wall further in is female threaded and someone did use a nipple to adapt to the MxF shower arm.
I would verify what you have beyond the male threads to ensure you're not breaking something if you turn out the male threaded piece.