That’s stupid: these locks should support multiple codes so everybody just enters their house code to get in. And a way to issue a temp code for visitors that isn’t anyone’s apartment code.
Are you assuming that the exterior and intermediate doors have unique codes for each resident? That pretty much guarantees people will be carrying around the codes in their wallets for quite a while.
Either way anyone who visits once will have the front door and internal door codes and will be able to come and go as they please unless temporary visitor codes can be issued.