Since you seem to think he did know what was coming, how exactly did he know? Let's hear your theory on how he knew this cop was going to hassle him even before he turned into the parking lot.
He didn't (and couldn't) know that.
All he knew before he turned into the parking lot was that HE was going to give the cop a hard time if confronted. He hit the jackpot when the cop took the bait.
If the cop would have kept his cool, there's always the delete key.