P2P Sharing is quite out-of-date now and it's highly Illegal.
The reason it's highly Illegal is due to the fact that you, the Distributor of Copyrighted-Content, are sending Copyrighted-Content over to somebody else. The thing is, you don't own the Rights to that Content and neither does the Person that receives that Content. Then, that Copyrighted-Content the Person received can then be sent to somebody else and thus' it creates a Chain of Illegal-Distributing
.And in case you don't know, Copyright-Laws are quite strict(Although, this differs depending on your Country).
Have you ever heard of the Case about the P2P File-Sharing, Napster? How it goes is that the Band, Metallica, are about to release a Song, but it's delayed(I think it was anyway). Then, People over on Napster somehow get a hold of it. Metallica then decide to take Legal-Action against Napster all because there were People on there Distributing Music that they didn't own the Rights to. After the Lawsuit, Napster filed for Bankruptcy due to all of the Fines that they were receiving. They then went through several Accquisitions. Napster still is available to this day, but as a Streaming-Service.
The Youtuber, Whang!, explains the whole thing in great Detail(
Just as a Warning though, there is a bit of Swearing in this Video):
Other P2P Services continued to show up over the Years, like LimeWire and Kazaa. Of course, they all suffered the same Fate as Napster. Now I highly suggest that you do not try to build something like Napster or LimeWire. Now while it is possible to build something like those Services, I suggest that you don't as you'll get yourself involved in a lot of Legal-Trouble and heavy Fines. Not to mention that P2P is now being replaced by things like Streaming. Now yes, you can still Pirate and Distribute Music, but I suggest that you don't Pirate and that you don't build a P2P-Service.