Dialects are part of the wonderfully complex world of human language, and Japanese has many distinct dialects in use, although only a handful could ever be accurately perceived by us gaijin. While anime series featuring a token character speaking Osaka-ben is a common trope, accents from other parts of the country are more rare. One exception was the character Yozuru from Nisemonogatari, who speaks a version of Kyoto-ben that’s very elegant and stylized (to say nothing of sexy)…but which would be quite difficult for non-Japanese to understand if watching without subtitles. I was reminded of how hard unfamiliar accents can be when my wife and I went to Australia. I was fine conversing with random people I met in pubs, but my poor wife (who learned most of her English in the Los Angeles area) had the hardest trouble understanding what people said to her.
Characters speaking Osaka-ben are not uncommon in anime.