I am not more moral than you, but will give my opinion.
Firstly. As for why some people obey, it's probably a bit to do with upbringing, education, perhaps having a strong moral compass, or a desire to be a good member of society.
Secondly. Many of those laws and rules are made for the smooth operation of society, or to improve or protect the lives of its members..
e.g. The yob in the flat upstairs might like playing loud music all night long, and think that it's his right to do what he wants in his property..
But what about the poor neighbour living below him with young children, who has to get up and go to work?
Where your world view is wrong is that if everybody did as they wanted, the whole system would break down.
Why write a book, if everybody is going to expect to download it for free. The same with movies, music and software. The system only still works because a large number of people are still willing to pay.
Even paying for sex I suppose. If no one did it, what would happen to prostitution? Don't forget the other side. Not all sex trade workers are willing participants. Human trafficking is bigger than ever.
Most road laws; Motorcycle helmet, insurance, drink driving (MOT in the UK), using a mobile phone while driving etc. are for your and other road users protection.
Streaming stations such as Spotify and Tidal, and radio stations all around the world, all pay a royalty for every time they pay a song to that particular artist, or whoever owns the rights to that song. Some artists do sell the rights to their back catalogues.
The other side of it is that artists get their songs listened to by millions of people who might then go and buy their albums. Massive publicity for them.
I'm not sure how libraries work, but they are not breaking any laws.
HTH