The problem is not all developers pay attention to fine detail when it comes to properly installing and uninstalling their software. This is a cross-platform problem on ALL operating systems. Developers spend a great deal of time on the software itself but they are not SysAdmins and they don't understand how things work in the operating system in the same way.
Windows suffers the same problems. On Windows there is Revo Uninstaller. On macOS there are several similar utilities to remove left over junk. But again, it's ultimately up to the developers. Ventura added an SMAppService API to handle helper executables within an App bundle so they can be executed when trashing the App. I've seen this prior to Ventura but it was only for removing a SystemExtension. What's new is all the extra potential to remove other fluff. Such an executable helper could also clean out configuration files and settings in Library folders.
"In macOS 13 and later, use SMAppService to register and control LoginItems, LaunchAgents, and LaunchDaemons as helper executables for your app. "
That means the developers can definitely uninstall LoginItems, LaunchAgents, and LaunchDaemons when the App is trashed. If they use the new API system call SMAppService. This was announced at WWDC2022. Apple is listening and has added this capability now it's up to the developers to actually use it in their Apps.
Ultimately, it's always up to the software developer to construct an installation and removal process that is reliable and clean. Sadly too many are not doing a good job of it. There are exceptions, but they are few and far between.
I would love to see Apple publish some best practices white papers for developers that are easy to find. Maybe include references to them in Xcode. Specific topics to include how to install your software and ensure it can be fully uninstalled. With some detailed examples and even a sample project and tutorial.
The topic is vast and complex and will vary quite a bit but developers need to learn how to install and uninstall their software properly. Commercial software vendors need to start taking it seriously. Even Microsoft had to write Fix-It packages that run scripts to uninstall Office on Windows among other things. For macOS, Microsoft released an Office-Reset tool which is just some packages to reset Office to defaults and to remove Office Apps. Looking at these packages in Suspicious Package I can see it's really just scripts to clean up things just like a typical Fix-It package.
Suspicious Package is a great tool to examine the contents of a macOS installation package. Primarily you would need to know what to look for in regards to finding a malicious payload. But it definitely documents what the package is doing and where everything is going so you can use it to help you manually clean up residue left over after removing the app. Another tool called, Apparency will examine an App bundle.
So again, it's a complex problem that plagues the entire computing industry and has not been fully solved for any operating system.