Pulmonary edema happens as a result of what?

Heart failure. Pulmonary edema is a result of heart failure. When the heart doesn't squeeze ir doesn't relax properly, pressures in the heart can rise and cause 'water in the lungs' - pulmonary edema.