I can understand some Cabin Crew objecting if they see that they might be included in the photo but if it's obvious that they won't be I can't see any reason for pulling you up about it. Maybe they were having a bad hair day or just wanting to show their authority, some are like that.
I try not to take pics when they are about the cabin anyway - which isn't hard to do on a long flight, given their liking for chatting in the galleys.