It seems that you are not aware in what format you installed your apps.
Before you install an app, be aware what format it is, that you are installing. Is it a debian package installed via the apt cli or via some store gui? Is it a snap package? Is it an appimage? Is it a flatpak? All of these are different and can have different issues (advantages/disadvantages). Often the same app is available in multiple formats.
This is a great video explaining what formats are out there: https://youtu.be/1lLZ-59xH3Y
How can such thing happen? Was an account hacked that had the permissions?