An ideal transformer would have an infinite magnetizing inductance. A simple (linear) model of a real transformer which takes into account winding resistance and magnetizing inductance as well as leakage inductances and core losses looks like this:
Where there is an ideal transformer Np:Ns. Rp/Xp represent the primary resistance and leakage reactance, and X's/R's represent the transformed secondary resistance and leakage reactance. Xm is the magnetizing inductance (the main factor we're talking about here) and Rc represents core losses.
When the secondary is open, the ideal transformer and X's/R's are no longer of any consequence, but there are still Rp, Xp, Rc, Xm.
Usually the magnetizing inductance is chosen so that the magnetizing current is about 1/10 of the full-load current, so if the transformer will draw 1A at 220VAC it will draw about 100mA with the secondary open.
Of course that current is mostly reactive so the lost power is relatively small (due to the \$I^2R\$ current in the primary resistance and the core losses).
A more sophisticated model would take the nonlinear behavior of the core into account, but this is adequate for many purposes when the transformer is operated in steady-state and within ratings.
there must be a current in the primary circuit
that's what we call "magnetizing current". Also think about the reactance of the primary winding. \$\endgroup\$