Surely you didn't think having straight teeth is all there is to having a proper bite did you? THe surgery is to realign the jaw. Even if my teeth were perfectly straight I'd still only have two teeth that touch (the upper left and lower left molar). Too much bone has grown at the back of my jaw so the back teeth are farther down than they should be preventing any other teeth from touching. They have to go in saw the jaw into chunks, remove or add bits and then bolt it back together with plates.
It's called "orthognathic surgery".
I just finished flossing for the second time and I am PISSED and feel like breaking something. I also feel like clocking the people who have had braces but no surgery and keeps telling me I'm going to get used to the braces.
I know your situation perfectly, I first had to get surgery and get a screw installed in the "roof" of my mouth (as Andy puts it) after that, I got braces and they removed the screw, that is only the half of it. After that they had to realign my jaw, surgery again, now my jaws are in order, my bite is perfect, now all i have to wait for is to get these stupid braces out, when I come back from Canada they should go off!
Oh, and for me, after surgery, not being able to eat anything properly for a week made me lose 5kgs or so, dangerous stuff for me since I am lightweight as I am already...
So I know your situation, the pain will go away, and then they readjust something, the pain comes back, next surgery, I am going to be SOOO glad once all this stuff gets out of my mouth
Don't be scared, I know it isn't the most comfortable thing to have but you will be glad once the results start showing of, you can actually CHEW stuff, my jaws were so out of line they also had to pull my wisdom teeth (all 4 of them) luckily they did all of that during the first surgery and they gave em to me, they now stand proudly on top of my desk in that special water

I also still got the bar, it's a nice piece of mechanics
Well, good luck, and you'll be glad you had all this stuff done.