Hit songs are just simple four-chord loops stretched over three minutes of synthetic boilerplate.
There are many orders of magnitude more songs based on four chord loops than there are hit songs. Some people say it's easy to make a hit song. But there are a lot more people that want to do it than those that succeed. So I say no. Your take is reductive, and there is necessarily more to it.
Both the books and the song analogies are incorrect. In the case of code, the users for whom the programmes are written, are not engaging with the statements of the code, they are interacting with interfaces the programmes provide.
This is not the same when it comes to books and music.