Because as an ion, it exhibits +1 valency, similar to alkali metals.
In many cases, on ionisation, hydrogen forms
This is why it is often placed along with the metals.
As you observed, Hydrogen is actually is a non-metal and is capable of forming
Sometimes, in recent versions of the Periodic Table, Hydrogen is placed in the centre at the top of the table, owing to its unique properties.