I've had to build a deb package once. It's crazy how few docs and resources there are to do so, and how of poor quality they are.
The package format itself is quite complex, and you don't know if you must do something imperatively or decoratively, when to trigger it in the workflow of the install, if it makes sense to use debconf or not, how to use debconf with something else than bash, good practices, where to put things, to copy files, etc. And that's before you have to deal with dependencies.
Then you have to repeat that for rpm.
No wonder people are attracted to flatpak and snap.
Creating a installer for mac, windows and linux is a hell of a work. Not to mention making sure it compiles and run on all those platforms.
Sometimes more than coding the program itself.