I put the iphone into recovery mode and restored to 4.3.3.
after it was all done it synced the phone and put the restrictions password back on the iphone?
How do I stop this from happening?
You have a couple of options. One is officially supported but painful. The other is a glaring display of how crappy Apple's security is.
Painful option: Restore the firmware again. Setup as a new phone instead of restoring the backup. You will have to setup everything again.
Other option: Jailbreak the phone. Use either a combination of WinSCP or similar SSH client and a plist editor, or install iFile which has a built in plist editor. Find the file /private/var/mobile/Library/Preferences/com.apple.springboard.plist. Look for something called SBParentalControlPIN. You can either change it and save it back to the original location, or since they stored it as plaintext just make a note of what the code is. See, I told you their security is crappy.
I think there's a third option of looking in the backup file somewhere, it's probably stored in there as plaintext too.
*note: if you are using this information for illegal or immoral purposes then shame on you. this information is intended for somebody who is a responsible adult and owns the device, but forgot what the code was and now wants to turn it off.