The movie is set in Chicago, Illinois, and it is illegal in that state to leave a child under the age of 14 home alone, at least for the time being. These days, a bill has been introduced in the Illinois House of Representatives to lower that threshold from the age of 14 to 12.
If you compare the age at which a child can be alone in each state, it quickly becomes apparent that the minimum age in Illinois is 14, which is two years higher than in any other state in the United States.
If someone informs the police or Child Protective Services, for example, that your child has been wrongfully left home alone, an investigation will begin, which will include interviews with children, neighbors, and others who may have knowledge of the incident.
That said, there is no federal law defining the age at which a child can be left home alone—each state decides that at its own discretion...
14 years: Illinois
12 years: Mississippi, Delaware, and Colorado
11 years: Michigan
10 years: Washington, Tennessee, Oregon and New Mexico
9 years: North Dakota
8 years: North Carolina, Maryland, and Georgia
6 years: Kansas
No restrictions: 36 states
By the way, in England, leaving children under the age of 14 alone is considered a criminal offense. In Germany, you can go to jail if you leave a child under 14 alone for even fifteen minutes. So, this law does not exist only in the United States.