Why does hydrogen phosphate act as a base?
When hydrogen phosphate salts are dissolved in water there are two main equilibria formed. This is based on the fact, that hydrogen phosphate can act as a Brønsted–Lowry base, i.e. accept protons, or as an acid, i.e. donate protons. For water the same is true. In addition to this it can react with itself, which is known as the autoprotolysis of water:
$$\ce{H2O + H2O &lt;=&gt; H3+O + {}^{-}OH}\tag1$$

With this knowledge you can write
\begin{align}
\ce{HPO4^2- + H2O &amp;~&lt;=&gt; PO4^3- + H3+O}\tag2\\
\ce{HPO4^2- + H2O &amp;~&lt;=&gt; H2PO4- + {}^{-}OH}\tag3\\
\end{align}

To a lesser extent there is also the following equilibrium happening:
$$\ce{HPO4^2- + 2H2O &lt;=&gt; H3PO4 + 2 {}^{-}OH}\tag4$$

From the acidity constant you know that $\ce{HPO4^2-}$ will react mostly as a base, i.e. $\mathrm{p}K_\mathrm{a}(\ce{Na2HPO4})=12.35$, so the equilibrium $(3)$ will be predominant.