It is to do with Le Chat.
In an acidified solution, Ba produces ppt with sulfate, but not phosphate due to the relative weakness of the hydrogen phosphate ion.
This is because hydrogen sulfate is able to react with water to produce hydronium ions and sulfate ions. Enough sulfate ions are produced to form a ppt with Ba.
Whereas, because hydrogen phosphate when it reacts with water to produce hydronium ions and phosphate ions, the equilibrium lies too far to the left to produce enough phosphate ions to form ppt.
When ammonia is introduced, [H3O+] decreases, shifting equilibrium right to produce more PO43- ions which can then form ppt with Ba2+