Very unprofessional indeed. The weapon is not "cleared" from what I can see. The magazine is in, but unlcear if it was cocked. Regardless of that, it's still unprofessional. As Wendy already stated about department rules and what not, no need to repeat what she said.
Sure, it might be fun to do things like that, guys will do almost anything to get attention from women. Even if that means using your "job" or "uniform" to get them pay attention to you. Having a female pose for a picture isn't all that bad. Having them holding what appears to be a loaded assault rifle sitting on the hood of a police car half naked (even though she does look good) is unprofessional. If you went to take pictures like that, get it cleared with the department and proper channels and do it the right way.
As for this happening with EMS stuff, same goes. It's putting out a bad "image" for the department or whomever you are working for.