I don't think you said anything wrong... Personally I don't find anything wrong with saying "Arigato gozaimashita" after having taken photos, because what you are trying to say is "Thank you (for HAVING ALLOWED me to take photos)," so thanking them for something they've done for you, so to say.
But because it is in "past" form, (1) some people might have found your thank-you sounding a bit too final, as if to end the conversation. Or, (2) some might have wondered "Have I done something for you before?" because it is often used to thank others for past favors given, like "Senjitsu wa suteki na purezento wo arigato gozaimashita" (Thank you for giving us a nice present the other day).