Curious how you knew they were illegal?? If you went to a place that used a sliding fee scale and were denied a reduced cost, then you are luckier than those who can't afford such a service, its all a matter of perspective.
You have no idea what each paid or didn't pay, who was free or why, or what their immigration status is.
Also curious what news sources you use? Any right wing news source loves to pound people with nonsensical numbers, how can you have missed this??? Use unbiased sources such as PEW, more than one source to get the most accurate picture we can get based on what we know.
Have you really tried to find a cost vs benefit chart on the contributions of undocumented because most who like to dehumanize people from the south of our border refuse to see that reality is nothing like they wish to believe.