I noticed that the download page for VSCode (https://code.visualstudio.com/download) has a single .deb
for all versions of Ubuntu/Debian/etc. and a single .rpm
for all versions of RE/Fedora/SUSE/etc.
How can a single file work for multiple versions of a single distro, let alone multiple distros? I would think that different versions of libraries etc. would make this not work, as seems clear from e.g. https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian or https://superuser.com/questions/1650570/is-it-safe-to-install-ubuntus-deb-packages-on-debian-are-deb-packages-univer
2
Answers
The logic behind creating universal packaging formats is that they make packages easier to maintain.
All Debian-based distributions are based on the same .deb packaging format that is inherited from Debian. That is why the Visual Studio Code .deb package that Microsoft made works universally on all Debian-based distributions. Instead of creating multiple .deb packages, one for each Debian-based distribution, Microsoft created one generic .deb package for all of them.
All rpm-based distributions are based on the same .rpm packaging format that is inherited from either Fedora or RHEL, and as a result the Visual Studio Code .rpm package that Microsoft made works universally on all rpm-based distributions.
You can do that when you statically link. I.e., you do not use system libraries. You have very minimal requirements. On the other hand, every time a security problem appears in these libraries, you must rebuild your package. Which people rarely do.