I think about it this way:
Currently there is only one thing you can do which creates an automatic penalty shot due to the amount of time on the clock, and that is deliberately knocking the net off its pegs in the final 2 minutes. Other things you can do to create a penalty shot: trip someone on a breakaway, dive on top of a loose puck in the crease, throw your stick or glove at the puck, jump off the bench illegally to prevent a breakaway.
The governing principle here is that the penalty shot restores an imminent scoring opportunity that was taken away illegally.
OP proposes that penalty shots be awarded for non-scoring opportunity infractions, based entirely on the time of game. I can’t get on board with that, because it’s not aligned with the opportunity-restoring purpose of a penalty shot. A random offensive-zone tripping penalty is simply a 2 minute minor, not something that should result in the opponent getting a free shot on the other net to determine the outcome of the game.