Because it is a polar molecule.
A hydrophilic molecule is a term used to describe a molecule that can bond with water, meaning that it is attracted to water molecules.
A water molecule is formed when an oxygen atom covalently bonds to two hydrogen atoms.
The molecular geometry of the water molecule ensures that these polar bonds form a net dipole moment, which has a partial negative charge on the oxygen atom and partial positive charges on the hydrogen atoms.
Ammonia is also a polar molecule, which implies that it too has a net dipole moment. Once again, the hydrogen atoms bonded to the central nitrogen atom will have partial positive charges and the nitrogen will have a partial negative charge.
So, when ammonia is placed in water, the partial positive hydrogens will be attracted to water's partial negative oxygen, and the partial positive hydrogens of the water molecule will be attracted to ammonia's partial negative nitrogen.
This particular interaction allows water and ammonia to form hydrogen bonds. More specifically, the lone pair of electrons present on the nitrogen will be attracted to one of water's partial positive hydrogen atoms.
So, as a conclusion, ammonia is hydrophilic, or water loving, because it is a polar molecule.