I'm intrigued. Might I ask what law you are speaking about? Because from my understanding, fanart would only be illegal if the artist was selling their work under the precedent that its official material, violating copyright law.
Otherwise, since no one can seem to agree on a concrete definition to constitute art, the parameters are subjectively defined by the viewer. Personally, I consider fanart and other "derivative works" to be just as meritable as "original" art. They require technique and precision, evoke emotions, what have you. As for fanart, the bigger concern is whether you're creating something different from your subject piece rather than replicating it. In theory, you could make a carbon copy of someone else's piece. But if you weren't the original creator, it's less impressive since you're imitating what's been done before. And may the muses enervate all your creativity if you claim that your subject's your original design!
Originality is an illusion. Every single thought you'll ever have is paraphrased from knowledge derived by those who've communicated that knowledge before, which in turn, is built upon or directly taken from someone before them.
Moreover, I find it ironic that some of the most notable works of art can get away with direct adaptation of source material over fanworks. For example, Paradise Lost is basically a fanfiction of the Bible. Then you have much of the focus of Renaissance art depicting events from the aforementioned religious canon such as The Last Supper. The prevalence of Christian influence in European culture operates almost uncannily identical to a fandom.
Let me explain myself. On what is art. I agree, originality is an illusion. We have thoughts based on what we perceive around us. This isn't new information. But how we express information can vary from person to person. Let's say we look at clouds and draw a specific cloud. You think one cloud looks like a dragon, but I think that same cloud as a face. We both saw the same thing, but we perceived it differently= expressed it differently.
My personal opinion. Like I said.
Fan art is fine for me. It's pretty cool.
Now, onto the law stuff. The reason why there's stuff about the bible, Shakespeare and all that is because they're in public domain. Their authors are very dead and copyright laws don't apply to them. But America, particularly Disney, have made copyright law stretch over such a long time is that even if your dead, your creation is still protected under copyright law for 70-something years. So that way, no one can make a better Alice in wonderland than them. No one can make a better Peter Pan than them.
As for the legality of fan art. Like I said, is REALLY COMPLICATED.
There's a lot of specifics to fan art and what is legal or not legal. Long story short, sourced from deviant art's website:
"Fan art starts its life as a “
derivative” work of the copyrighted original and, as a result, technically
fan art is copyright infringement. It can also be a violation of trademark law and sometimes the actor’s rights of publicity if they are well represented in the fan art."
"Fan Art can be OK and qualify as “fair use” under the copyright and trademark laws; meaning that even if technically it’s an infringement and even if the copyright owner hates it, the way in which the fan art uses the original either completely transforms the original or uses the original in a small way that doesn’t harm the commercial interests of the copyright owners."
From KiRAWRa on Deviant Art:
"Copyright for derivative works applies
only to the creativity that has been
added to the original. For example, let's say you draw some fanart of Pikachu from Pokemon. You didn't use any of Nintendo's official Pikachu art in your drawing, and you interpreted Pikachu into your own unique style. This fanart counts as a derivative work instead of a copy, because you have made significant creative changes to the original character. This means that the fanart you have drawn is copyrighted to you. However, you did not create Pikachu and so you do not own the copyrights to Pikachu used in your drawing. Technically speaking, this means the very existence of your fanart is infringing on copyrights, because you have used a character that you do not own and do not have permission to use. More so, this also means the selling and reproduction of this fanart would further infringe on Nintendo's copyrights. "