In the early days of test flying, airplane engineers would draw flight performance graphs on the back of their mail envelopes while they were talking over lunch. When they were referring to "out of control," situations the performance graph would often extend out beyond the edges of the envelope, hence the proper term, "outside the envelope," meaning beyond the boundaries of normal flight, or now, beyond the general boundaries of normal anything. Since the pilots who were getting into these out of control situations were "pushing" the limits of the airplanes, the mixed metaphor stuck - hence, pushing the envelope, which is the active verb referring to creating any extreme situation.