The X-15 was designed to test certain aspects of spacecraft design. Think about it: normal aerodynamic principles of craft control won't work in the vacuum of space, so you need some other way of getting a pilot to test advances in spacecraft design. Thus the X-15. Rocket powered, it would be taken up to a high altitude and dropped free. Using its tremendous rocket engine, it would zoom up to the highest levels of our atmosphere where the air is so thin that normal aviation controls don't apply. An area where you have to use directional thrusters, gyroscopes and the like to maintain control. This was NASA's way of helping to develope the controls that would eventually be used on spacecraft such as Mercury, Gemini, and Apollo. The pilots who flew the X-15s were among the best.
Fifty years ago test pilot Scott Crossfield was strapped into the first X-15 craft, attached to a B-52 bomber, and let go at an altitude of 38,000 feet. This was a test mission to ensure that the aerodynamic controls of the X-15 did work, so that the craft could be safely landed on the dry lakebeds of Edwards AFB. When you think about it, he performed what would be standard procedure for the space shuttle - controlled glide to landing without the option of a second chance. Of course, it was a successful flight.