Yes, betta tail trimming is common, and is safe if done properly by someone who knows what they're doing.
You lay the fish on a wet paper towel, and use another wet towel to cover the head and torso. Then fan out all the fins - you can trim the anal, caudil, or dorsal, and probably the ventrals too. The cutting is done with a sterile razor blade by pushing firmly down. Do not drag the blade because that will cause ripping of the fin. Only the edges are taken off, not too much. They do have feeling in their fins (short finned bettas more so than long finned ones), but since trimming only occurs when the fish has finrot, the goal is to trim off the dead, damaged parts of the fin. The nerves in the finrot damaged edges are dead, so the fish can't feel it.
And that's how and why betta fins get trimmed.
Also, sometimes fish do need to be operated on, and it's possible. I believe CFC had to do "surgery" on one of his monster fish. He mentioned it a really long time ago, so I don't remember what was wrong or what species of fish it was.