Do people really give their dogs bandanas like that? Like, why though? Other than fashion, what is the purpose? Is the dog a farmer? Is the dog part of some street gang? The Mexican cartel? Trying to hide its identity from other dogs, mostly police dogs? Maybe it's a weed farmer where weed is illegal, so the bandana works for both ways.
Or it could just be a bib because the dog is a messy eater. That's a more boring headcanon but possible.