Ideally all H.S. would be excellent and we wouldn't need a lottery system to get into schools.

But given that this isn't currently true and parents at least perceive one school as better than another for one reason or another school district need ways to seem fair. A lottery is one way to make it at least seems that way. It's hard to make everyone happy. I know some of the larger school districts have complicated applications processes for their magnet H.S. I know both LA school district and NYC are very complicated.

My kids attended a 'alternative' public K-8 that used a lottery system for admittance. Siblings did have priority. This lottery was started after the lines for registration to the school got so long that parents were lining up for days. Having spots going to parents who had the time to stand in line for days certainly wasn't very fair & and a lottery cut through a perception of favoritism.