Sounds like a drug interdiction detail by PSP. At least in the western part of the state PSP drug interdiction on I-80 is a way of life. The object of an interdiction detail is to maximize vehicle stops in the hopes of discovering drugs of large amounts of currency. Typically the Troopers seek to identify vehicles that their "experience or training" suggests is a likely prospect to engage. The type of vehicle and its equipment (expensive, tricked-out, window tinting), state of registration (source state like NY, FL, TX, AZ, CA, MI), occupants if it can be determined (number, gender, age, and race). There are of course many other "factors" that may persuade a Trooper to engage one vehicle as opposed to another. It's possible that your vehicle, due to the window tint, was the only one which presented a pretext for initiating a vehicle stop. The window tint explanation is actually an especially useful pretext as the Trooper can testify that from the brief view he had of the vehicle (or the low light conditions) he believed it was possibly in violation of PA law. Upon closer inspection he determined that it did not violate the law. The only purpose of this exercise is to stop a vehicle to allow them to have the kind of encounter you describe. The questions put to you are standard, indeed Trooper are trained in this particular "investigative" exercise. They are attempting to gauge the behavior of the driver and any occupants--their ultimate goal is to obtain "consent" from the driver to a search of the vehicle and from the occupants a search of their persons. If they find contraband or a large amount of cash they win and you lose. If, as here, they find nothing--no problem, maybe better luck next time. My advice to everyone: As mentioned by
Attorney Doyle, be polite and respectful in any encounter with law enforcement. You are always on their playing field during an encounter and you have no prospect of winning. Beyond providing information required by law (as a driver of a vehicle you are legally required to show license, registration and insurance information) provide nothing further. Do not consent to any search of the vehicle or your person. Under the circumstances you describe, the pat-down against the Troop car is borderline but not something you can resist at that time. Politely ask if you are being cited for a violation and if not may you continue on your way. If your time estimate of the encounter at the side of I-80 is even close to accurate, the whole encounter was probably well beyond lawful. Unless you have an audio/video recording of the entire event not a likely subject for a lawsuit.
I do not think that things should have been done differently by you. If issued a ticket in the future for it you can fight it in court. I would advise against arguing with the officer if he does write a ticket. Instead wait until your day in court.