What are the consequences of installing CWM? I installed CWM sometime back and switched back to a stock ROM. When I installed CWM I lost my userdata, by which I mean the phone started as it would for the first time after opening the box. I used fastboot oem unlock to unlock the bootloader so I could install CWM.

I want to root my phone, but I don't want to lose all my userdata this time. Is CWM is a must for rooting?
fastboot oem unlock always deletes userdata for security reasons, so it must be used only once (until you lock again manually).
CWM is needed if you want to flash a root package (you can't push it via fastboot), but that is not usually the only way to root a device.  The CWM install needs only the fastboot flash recovery recovery_name command, which does not affect user data.