I think the absolutionist take here is unproductive.
I would argue a writing a fugue is analogous to "building a computer program"; to say little of 12 tone chromatic atonal music compositions that usually sacrifice 7 tone based harmonies for interesting structure, like palindromic reflection of ascending and descending musical ideas, and optimising for a high number of pitches in a melody.
Additionally, 7 note diatonic music theory can be completely summed up with two statements:
1) tick-tick-tock-tick-tick-tick-tock
2) permuate all the things!
Most common western instruments are literally built to only play 7 tone diatonic music theory.
Look at a piano. It can literally ONLY play "semi-tones". It's impossible to explore music beyond the 12 note chromatic scale without first modifiying the physical construction of the piano.
What makes good music good is ultimately human ears. Fugues, for example, might seem to be programmatical at first glance, but get your hands dirty and compose one yourself, based on nothing but the mechanical rules. Doesn't sound good? It doesn't.
It's like writing English based on syntactical rules. You'll end up with a music equivalent of "Colorless green ideas sleep furiously".
To me, and most digital art, I build it very much like I build my computer programs. An evolving exploration of a domain, leveraged by macros that encapsulate former techniques that work well to produce a desired sound/effect. I'm essentially building a framework for churning out songs through this process. Then you can experiment within those frameworks to build out related songs(in mixing and tone and techniques) producing a collection of related works.
Even traditional rock artists were experimenting and building up frameworks to help them produce cohesive works.
... or you can go the other way and look at Atonal music such as Schoenberg :)
Computer programs must follow the rules... the rules get made up first and the programs get built to conform to the rules.
Music theory isn't like that. The music comes first. The theory gets made up to try and describe & understand what is going on with the music. It's not at all like a program where the rules & theory come first and you build something that fits into that.
If you write a piece of music that doesn't conform to some kind of arbitrary rule in music theory that's fine. If your music is successful and important enough someone will modify music theory to explain why your music was successful and important.
There is a cycle where you learn some music theory to help learn music but the theory just helps you understand what's going on, it doesn't force you to do anything a certain way. You can't come at music and think about it like you're building a computer program.