I am so sorry to hear about your cat's death. My sincere condolences.
My name is Rebecca. I am a veterinarian and will do my best to help.
Cats with fluid in the lungs, with respiratory distress can be easily stressed and die. Was she breathing with her mouth open when she was taken to the vet? Were her gums pale in color, or pink?
Often by the time we realize a cat is in respiratory distress, they can be down to less than 25% of air filled lungs. If they get stressed from a car ride, an Xray, any restraint, or an exam by a veterinarian, the increased demand for oxygen can't be met; there are no lung reserves, and death can happen quickly.
I can't tell you for sure this is what happened, without seeing the Xrays or tests that showed pneumonia. I do know that these cats can be very fragile and hard to save. An autopsy would probably tell you why she died.
I am so sorry she is gone. Let me know what other questions you have.