Open directory with programs installed

Several programs that I install by the program manager when I go to use and look for a directory it does not show, example of these programs is Visual Studio Code and GitKraken, I can not search the directories in /var/www/html/.

Obs.: For me to use I have to install manually, but when I upgrade I lose the programs.

What do I do?

Flatpak packages are in sandbox. So they cannot see files outside.
You indeed need to install tarball VSCode yourself. But that won’t be destroyed by swupd because you can extract it in yore home directory.
For GitKraken, I don’t see any problems.

So what is the purpose of having these programs? I honestly do not understand.

flatpak’s sandbox can still allow limited access to partial home directory paths, like Videos and Documents. This adds some extra security. For things like wine it’s not really useful, but for simple desktop applications it is fine. For instance, for games it is often more than enough because they don’t really need to save anything anywhere to be shared with other programs.