Stanford is so competitive that even the most "suited" person needs luck on his/her side during the application process. It's almost a crapshoot for most people in the first place and while your numbers certainly impressive, it's still going to be hard for you (also the fact that Stanford has been leaning towards a younger pool of applicants). I don't think anyone can tell you what went wrong unless someone gets a chance to read all your essays, your letters of recommendations, and your entire application as a whole. Generally speaking though, it's just extremely difficult to get in Stanford, period. I can't tell you what improvements you would need to make next year for Stanford but just be realistic in the fact that Stanford accepted only 488 out of 7204 (US News), which is even more impressive than HBS. Also, without knowing what your post-MBA goals are, I can't really recommend any schools. Lastly, if I were you, I'd broaden my scope of applications a bit more, unless you're only aiming for the top schools (more of a all-in or nothing thinking).