Your Harry Potter case is a good illustration.
The world Harry Potter universe clearly borrows heavily on past literature - whether that be tales of goblins and wizards or tales of boarding school.
So much so ( and the fact that she is very rich ) she has been sued multiple times for plagiarism - all of them failed.
Is it really beyond the wit of man to come up with something similarly new?
In terms of fan fiction - is it ok to do one, and promote it on the internet, that has incest themes or paedophilia? These potentially reflect back on the original - and surely the creator should have control here.
There is always the option of coming to an agreement with the original author - that's how films get made - but frankly there is an almost infinite creative space - I don't see why people's lack of creativity needs to be promoted above the rights of an existing creator.`
Note in the example you quote - JK Rowling has allowed the non-commercial publishing of that and other fan fiction - just blocked independent commercial exploitation. So in the case you made the existence of copyright didn't stop Harry Potter and the Methods of Rationality.