Why are the photos and videos distorted on the margins?

You can go to "Settings" - "System Settings" - "Lens Distortion Correction" and turn on "Lens Distortion Correction." Doing so will make the photos or videos look normal . When you turn "Lens Distortion Correction" off, the photos or videos will appear distorted again.