I can't theorize on the 'Why' part of your question, but there are ways around using Android Studio IDE to make Android builds without gradle build system.
If you want to learn exactly how the APK/AAB is built and compiled, here are some resources I used to learn: