The activities of the street vendors are illegal, and some of them probably have pretty dubious immigration status; but the fact that they remain active, are quite numerous, and are visible enough to form a union suggests that the local authorities lack the will or ability to suppress their vending; and the national authorities the will or ability to process them all as vigorously as the law theoretically allows.
Under those circumstances, it isn't terribly illogical for the mayor of Barcelona to be open to negotiations aimed at reducing the nuisances caused by street vendors in exchange for potential loosening of restrictions that are mostly theoretical or haphazardly and unevenly enforced at present.
It always upsets people who cherish the idea that 'law' is somehow a matter of pure principle and above the sordid world of pragmatism and political horse-trading; but that doesn't make it any less true. Even when the ability of the state to enforce the law is relatively strong, pressure is applied by lobbying the political apparatus. When it is weak or partial, pragmatism can, and often does, result in the state(or its agents) reaching a compromise with the illegal sector that aims to give the less noxious elements some of what they want in exchange for cooperation, or at least non-resistance, in going after higher-value targets.