Answer: Yes, you can exit the airport during a 3-hour layover. However, it's not recommended to risk leaving the airport for just a few hours. You may have to go through other formalities and you might end up missing your flight.
Do I have to go through TSA again if I have a connecting flight?
as long as you stay in the terminal you do not have to go through TSA again. If you leave the secure area you will have to be screened again. Also if you are taking an international flight that connects to any other flight you will have to go through TSA again after you clear customs.
Is it illegal to leave airport during layover?
Mostly, yes! And in most cases, you can leave the airport during a layover in the US, even while traveling to an international destination. International travelers need to make sure they have a valid visa to travel in the US. But, whether you need to leave the airport or not during a layover is completely up to you.
