There are The Last of Us Part 1 safe codes and combinations to be found in The Outskirts, Bill's Town, Pittsburgh and the Suburbs. Each one is an optional objective, but will get you essential rewards like lots of parts, supplements and even a training manual. They're not hard to open and those rewards make the effort more than worth it.
The codes themselves are nearly always near the safe itself. You don't even have to look for them if you don't want to, as they never change, and I've got them all here. So if you just want to look them up use them, you can.