It’s a USA Hockey event, so the qualification comes from regional associations that sponsor high school hockey. The host also gets in.
These teams are not part of the more traditional scholastic varsity competitions, though. For example, the Minnesota teams in that bracket, Edina and Wayzata (the host, I believe), come from “Junior Gold” hockey in Minnesota, which is a secondary developmental path for high school aged players. Those are not the high school varsity teams, i.e the ones that play in the MSHSL.
The other teams - like Stoneman Douglas in Florida (yes, THAT Stoneman Douglas) and Santa Margarita in California - come from USA Hockey sanctioned high school leagues that may or may not cover the whole state (I think those two in particular are sort of partial state leagues). The article linked about the Stoneman Douglas state championship quotes:
The league is sponsored by Statewide Amateur Hockey of Florida, not the school or the state’s high school athletic association.
Most states where the state high school athletic association sponsors high school hockey don’t have a separate USA Hockey sponsored league, though, since there wouldn’t be enough players to field a school team (Minnesota is a bit of an outlier there). That is why this field may seem somewhat strange.