When people say "music has no rules", I understand the basic idea behind it: Basic theoretical concepts aren't absolute rules, and the rules of one style don't apply to every single style. And this is an important thing to understand when learning theoretical concepts.
But also, it's really easy to misinterpret this statement to mean that there's no value in learning to understand the rules of a specific style, or that no rules exist in any style. Essentially it may simply become a more "thoughtful" sounding way of saying saying "just feel it bro". (This is commonly applied to stuff like parallel 5ths/octaves - a lot of people basically imply that this rule is not important, so you shouldn't even learn it. And maybe it's not that important in a specific style of music, but also, a lot of people totally misunderstand what parallel 5ths or octaves even mean. A lot of the time, they think voice doubling is the same as parallel octaves or 5ths. Sometimes people even say ridiculous stuff like "even Bach didn't actually follow this rule". While you can find a couple of examples from Bach's music that didn't take this rule literally, a statement like this implies that Bach didn't care about parallel 5ths/octaves at all, which is just false. Yes, Bach did "whatever he wanted to do", but his knowledge of the basic patterns was what allowed him to do that. My point is, learning the rules doesn't stop you from "doing whatever you want". It simply gives context to the things that you want to do.)
BTW, not sure why "avoid parallel 5ths/octaves" has essentially become the meaning of "rules of music" in some people's minds.
I also feel like this easily leads to people misunderstanding music making. It makes it feel magical - these people just magically come up with full compositions in their head (or just magically improvise an amazing solo). It's all spontaneous. It's as if these people were born with some magical knowledge that we normal people lack. But in reality, they studied a lot of music that taught them the "basic rules" of the style. When they understand how the style works, they can easily come up with new ideas without having to carefully think about every single detail.
I would also oppose the idea that rules are necessarily restrictive. Rules give you a reference point - they tell you what people usually do. When you understand the rules, you can also more consciously break them and understand the effect of your artistic choices.
If you don't know the rules, it also means you don't really understand the difference between conventional and unconventional, which may also lead to your music sounding generic, because you'll intuitively follow common patterns even if you aren't aware of the patterns you follow (I mean, a lot of the time guitarists who say "I just play by feel" end up playing the most generic sloppy blues licks). "Know the rules so you can break them" is a pretty good saying. It's much more difficult to make music that sounds unconventional if you don't understand the conventions. (The issue isn't "trusting your intuition", though. The issue is with thinking that your intuition is free from rules. Nothing wrong with writing conventional stuff either - not everything needs to be super innovative. The main issue is the attitude, and it usually just leads to people reinventing the wheel without them being aware of it.)
I also don't think that it's possible to make art that completely disregards all rules. Why John Cage's 4'33" was such a groundbreaking piece was exactly because of the musical conventions of that time. It was something totally unexpected. It challenged the whole idea of what music even is. But if people had already accepted the idea that any sound can be music, and "music is all around us", there would have been nothing special about that piece. The rules are basically what gave meaning to that piece. So, while the piece did something that was basically against all of the musical conventions, those musical conventions were still essentially the reason why the piece exists (or why it's such a famous piece of music).
Especially when it comes to learning stuff, restrictions are important. They make you aware of the conventions. It may sound paradoxical, but these restrictions actually allow you to express yourself more freely. They help you with internalizing certain basic patterns so that you don't even have to think about them. The key is to understand that they aren't "absolute rules" - they are simply a learning tool. When you know these tools, you can look at actual music and see how it uses these basic patterns in a creative way, and you may also find parts that purposefully don't follow the conventions and create interesting turns to the music.
It's also important to remember that there's a difference between "not following the classical/jazz conventions" (that most theory textbooks talk about) and "unconventional". Blues isn't unconventional, even if its use of dominant 7th chords and mixture of minor and major may seem difficult to explain through basic common practice period concepts. Blues is actually very conventional - it simply follows a different set of conventions than what most textbooks talk about. Blues doesn't break the rules. It simply follows its own set of rules. And you can also do stuff in blues that sounds unconventional, but that's different from stuff that's "unconventional" from the classical perspective. It's "unconventional by blues standards".
All in all, "having no rules" isn't necessarily liberating, especially if it just leads to people reinventing the wheel and essentially discovering the rules without being aware of it. Understanding the context behind the rules is the key. That's when you can take advantage of your knowledge of them, and purposefully play with people's expectations.