I think you are confusing or seeing people use the word root and unlock interchangeably. To root a phone (or any other device) is legal. To take a phone, and unlock it for use on any carrier without consent of the original carrier is illegal last I knew.
However, be advised: I have been hearing that rooting the Fire can be tricky. I would read everything you can about it several times before doing anything.