Tony never ended up in Jail even when he was actively engaging in highly illegal international military action. You could do far, far worse than to have Stark in your legal corner.
Although it begs the question. Parker isnt officially an Avenger, but he is Stark's protege and presumably is officially registered under the Sokovia Accords. So maybe he's not in trouble for the death of Mysterio in and of itself, but for going off the books, just giving away all that tech without consulting the office, and never calling the incident in. And he gets let out because he did try and ask for help and Nick Fury shut him down.