The derailleur hanger appears to be installed correctly.
Notice there is a small bolt forward of the axle, that obviously goes in a hole in the dropout and stops the hanger falling off when the wheel is out. The hanger also aligns with the dropout slot to allow the wheel to be removed.
I think your confusion comes from the fact that hangers on more modern bikes tend to have the lug where the derailleur mounting hole is located behind the axle, but these bikes also have downward facing dropout slots rather than rearward facing ones.
Edit after comments clarifying question:
The only new derailleurs that are designed for a 5 speed bike are Tourney, although you. You could actually use any 8 or 9 speed derailleur as the actuation ratios are the same, but I doubt that would work any better than a Tourney derailleur on the 5 speed freewheel.
WhatIf you want to fit a different derailleur what you want is a 'conversion' derailleur hanger for horizontal dropouts that is held in place by the axle nuts and provides a standard M10 threaded mounting hole.
Googling for 'derailleur hanger horizontal dropouts' should get you started. What you are looking for is something like this - note I'm not sure if that's exactly what you need and I'm not making a recommendation.