I can count on zero fingers how many viruses and malware I managed to install when I was still jailbreaking my devices. Ultimately, the decision to sideload apps should be up to the user, with caveats/warnings from Apple prior, similar to macOS with unsigned apps. The whole "privacy & security" bit is just a ploy to ensure the massive revenue stream that is the current App Store.
Much like the macOS App Store, there are apps which are prohibited from the iOS App Store because they replicate/improve on Apple's apps, violate prudency/oppressive-government guidelines, provide functionality that Apple wants to restrict for itself, etc. Plus, many people still don't realize that numerous iOS features (and some devs) were directly lifted from jailbreak apps - notifications, task switcher/closer, custom fonts, icon layout options, etc.