Depends on your country.
In my country I can legally make copies of for example books, movies, CDs etc, as long as the copies are only for personal use.
I can even legally privately share copies with family and close friends. As in close real life people that I have a personal relationship with.
A copy made for personal use cannot later be used for a different purpose. And a copy made for personal use must be made from a legal source in the first place.
The copy of The Matrix that a friend burned on a CD (DivX encoded file under 700 MB, that I would watch on the computer) and gave to me years ago, would have been illegal today because he got that movie from his brother who got it from a torrent tracker.
But if instead of downloading the movie from a P2P network his brother had borrowed The Matrix on DVD from the local library, and ripped it himself, and given a copy to his brother, who then gave me a copy, then my understanding is that this would have been completely fine and legal today in my country.
It’s all pretty weird.
In other countries, the laws are different.
My understanding is the laws you describe are mostly limited to a few European countries, while most of the rest of the world are more restrictive?
Also, with with the limited right to make copies like that comes quite high fees on recordable media that is paid to the music and movie industries as compensation through organizations like CopySwede here in Sweden.