Actually that is the flag for Cusco. I don't know if it's for the state or the city of Cusco, though.
The Inca's worshipped the rainbow and it was a common docoration in their dress (at the expense of many a macaw, I'm sure.) Cusco was the center of the Inca empire, so I'm sure that's how it got this flag.
I just have to wonder if Peruvians that visit the Castro or other gay cultural centers in the U.S. are really confused seeing all the rainbow flags.