On modern macOS (post Catalina) what you see as your internal disk is actually two 'volumes' (much like partitions); the signed system volume which is locked, unwritable, non-duplicatable, and can only be created by an apple macOS installer, and the other a regular volume to store everything else.
The first one, typically called Macintosh HD, contains the system and some of the basic applications cannot be modified, and the second, typically called Macintosh HD - Data, make up a so called 'volume group' and shows as Macintosh HD in finder. You can see the detailed structure in Disk Utilities, if you select 'show all volumes'.
So the contents of your apps folder is in fact a combination of the apps macOS installer installed on the locked system volume and apps in the apps folder that you have installed manually on the writable '- Data' volume.
As an example, when you use the "Erase this mac" option in system settings; this simply erases the Data volume (plus it logs out of iCloud account etc) so if you sell it, on first startup the buyer will be greeted with the "Hello" screen as if it was new, and be able to set up a new user account.