It depends on the content try to stream and from which country you are doing that also matters. Every country has a different law for streaming Geo-restricted content. Kodi itself is a program perfectly legal. Kodi is a popular alternative for Windows media center and it is an Open Source application. Kodi also faces restrictions when accessed by users from a foreign country. This is to ensure that the country does not suffer any internet threats and hacks. Though it seems to be legal, it is not a situation that most internet users expect. Thanks to the best Kodi VPN which forms a tunnel between the Kodi user and the accessed server. The data passes through the tunnel are all encrypted and it is anonymous as well. So, it is better to use a VPN for Kodi services to enjoy a safe streaming Some best services to use with Kodi are; ExpressVPN NordVPN
If you are watching a movie its coming from a servers that stores uploaded files. p2p is like a torrent in where you are downloading from a whole bunch of people and at the same time others are downloading from you.
With watching a TV show or movie on say, Exodus, you are only receiving and not transmitting, which is where I would have thought the term sharing was meant. As someone else noted there are p2p streams too, but I think they make a tiny % of what the general population using Kodi actually use, could be wrong though.
So basically, Kodi is ok, but torrenters not and thats the grey area of kodi.
ALWAYS USE A VPN TO DOWNLOAD TORRENTS OR STREAMING ON KODI FOR THE SAFE SIDE.
MY FAVOURITE VPN APP FOR KODI IS; CyberGhostVPN