Do not take this movie literally.
This small line in the movie is easy to miss, but, when Ferris's mother had to pick up his sister Jeanie at the police station, she lost a huge deal. She was going to use that profit to buy Ferris a car. So Ferris actually did get punished- he didn't get a car.
It is important for parents to make sure that teens don't get the wrong message from this movie, as Ferris faces no immediate consequences. But neither does Mr. Rooney. Ferris was wrong to ditch school, but Mr. Rooney was also wrong to go into Ferris's house without permission, to say nothing of parking beside a fire hydrant. What's more, Mr. Rooney wanted to "get" Ferris. His attendance was the only reason he could find to use against him. Excluding that, Mr. Rooney had no legal reason to discipline Ferris. Still, he made the school a place where Ferris wouldn't want to go. Mr. Rooney had a vendetta against Ferris for some unexplained reason.
The superintendent should've intervened. He or she should've required Ferris to come to school every day the rest of the year. If he did, that one day should've been forgotten about. But if not, there'd be serious consequences, such as all day Saturday detentions.
As for Mr. Rooney, he should've been suspended for a month without pay. Once the suspension was over, he should've been transferred. So really both Ferris and Mr. Rooney were unpunished. And remember, 2 wrongs don't make a right.