[Windows Phone 7 General] Talys:
You're confusing jailbreaking with carrier or service provider unlocking.

Jailbreaking allows installation of non-Marketplace approved programs (such as Chevron Ringtone Installer). A common term for installing programs through a process other than the approved one "sideloading".

Service provider unlocking allows the use of foreign SIMs in GSM phones (for example, using a Rogers Canada SIM in an AT&T handset).

On iPhone the two are often linked in that most jailbroken phones are also carrier unlocked; in fact, the carrier unlock usually requires a jailbreak, because the carrier lock component is embedded into the iOS. Thus, you can have jailbroken but not unlocked phones, and in some countries you can buy from Apple, unlocked, but not jailbroken phones.

On WP7 devices, carrier unlocking uses a mechanism similar to every other phone on the market. Basically, you insert a foreign SIM into a carrier locked phone, and the phone prompts you for a PIN. Enter the correct PIN and the phone is unlocked. Just like a Motorola RAZR. You or your unlocking guy sends a company that has an unlocking table your phone model, carrier and IMEI and they send back a PIN. I suspect that depending on the phone, they use a published table, algorithmically derive it, or brute force it on an emulator.

In WP7, there is a factory mechanism for jailbreaking phones and allowing sideloading of software. The program is a free download with the WP7 dev tools and called "Windows Phone Developer Registration". However, to use it, you need to pay Microsoft an annual $99 dev fee (AFAIK you can jailbreak any number of phones).

Once your WP7 is jailbroken, you can sideload apps, again, using a factory mechanism, from the WP7 Developer Tools, called, "Application Deployment". It allows installation of application packages (.XAP files), which is what gets sent to the Marketplace.

In response to the your question of why anyone would want to jailbreak or unlock a phone:

1. SP unlock phone to use foreign SIMs (this is hugely popular).

2. Jailbreak phone to install non-Marketplace approved apps. For example, the custom ringtone installer.

I suppose another reason will eventually be piracy -- I hope piracy doesn't become prevalent like with Installous on iPhone, but I suppose that's inevitable.

There are LOTS of reasons to install "homebrew" or non-Marketplace approved apps. MS has certain guidelines because they want their phone to work a certain way. However, you could conveivably sideload applications that did other wonderful things that would not be approved -- perhaps changing the behaviour of the lock screen, backgrounded tasks, or altering ringtones. Of course, a bad XAP that used code outside of what is documented and approved might also brick your phone or make it unstable.

Finally, sideloading allows companies to write custom software that they don't want to publish to the world at large. This is actually a very large market -- if you're a local courier company, for example, you could write a corporate app for WP7 that used GPS and geotagging that tracked where your drivers were and when packages were set up, and upload all of that to a server on a relatively very cheap device (vertical market devices cost thousands of dollars).

Remember, jailbreaking and carrier unlocking are totally legal (but, of course, piracy is not!).