When the public school can't meet the need
The route by which a district can end up paying for a specialist placement β and the ten-day notice rule that decides whether you get reimbursed.
If the public school genuinely cannot provide an appropriate education, the answer is not always a better IEP at the same school. IDEA contains a route under which a district can be required to fund a placement elsewhere, including a private specialist school.
Federally, a court or hearing officer may order the district to reimburse you for enrolling your child privately if it finds the district had not made a free appropriate public education available in a timely manner before you enrolled, and that the private placement is appropriate. Notably, the private school does not have to meet state education standards to be found appropriate.
What this looks like in practice (one state's system, as an example)
Massachusetts runs a formal structure around this. The state approves private special education schools, its Operational Services Division sets the tuition prices for more than 200 approved programs across roughly 100 private schools, and where a student's IEP places them out of district, the district in which the parent or guardian resides pays that tuition directly to the school. Districts must give preference to approved in-state programs. Several of the Boston-area schools in our directory are approved schools of exactly this kind. This is one state's machinery -- other states handle approval and funding differently, and some have no equivalent approved-school list at all.