Lol every guide to unlocking the phone warns you that it will completely wipe everything... not picking on you, but at least you learned now
As has been said, Wiping data/factory reset done from CWM will leave your sd untouched. Doing it from inside the phone will apparently wipe the sd as well. So no, when flashing ROMs you should never have to worry about losing stuff that is on your sd. Every ROM is going to have its own instructions about whether you need to wipe data or you'll be just fine with a cache/dalvik wipe, but again, your sd should be safe going forward now that you got the unlocking done