The sole purpose for locking the phone is that most people get expensive phones for free, or far below the actual cost of the device. The carrier you got the phone from didn't really give it to you cheap, or for free. By locking the phone to their service, they guarantee you will pay for phone before you can scoot over to a different carrier with it.
Why do you think your monthly fee is $79 (or about) with a minimum three year contract? You're paying for the phone during that time over and above the actual usage fee. It's also the reason for the high early termination fees. You're paying them back for your heavily discounted phone. Staying with a high cost monthly service after that point is gouging yourself. It's also why some carriers added new plan features that include, "Get a new free phone every year!" It again is not free. They're keeping you hooked on the high cost service plan.
Once the service agreement has been completed, or is close, most carriers will agree to give you the unlocking code since you've already covered the cost of the phone. Not that they always will.
Now to my point regarding this topic. We just unlocked our phones earlier this year when visiting Jamaica. There's no need whatsoever to erase the phone to do it. You enter a setting or app (changes with the type of phone) to enter the unlocking code. You enter the numbers, touch OK, and you're done. The phone can now be used with any carrier that supports the model phone you have.
1. Yes, backup the phone before unlocking it. It's just a precaution you should take before updating any device.
2. Unlock the phone, following only the steps necessary to actually entering the unlocking code. Erasing is absolutely unnecessary to do this.
3. Use your current SIM in the country you are visiting. Your carrier's plan must support international calling, which will be more expensive.
4. With our unlocked phones, we opted for the second method. Mainly because Go Phones don't work outside the U.S. at all. But you can still do this with most any unlocked phone. It works very well when you're only going to be out of the country for a week or two. Call ahead first to see if the hotel you're staying at offers this service. When you get to your destination, you rent a SIM that can talk to the local cell phone network. This is the sole pupose for any SIM. It decides what cell service your phone can talk to. Take your normal SIM out and put in the rented SIM. You can now call on the local cell network instead of accruing expensive international roaming charges. When your visit is over, return the rented SIM and put yours back in.