Why would Shakespeare create a character like Don Pedro in his comedy about romantic misunderstandings, "Much Ado About Nothing"?
Because Shakespeare doesn't believe in sticking rigidly to "genre". This is the man who wrote a comedy about a Jew, just like Marlowe's "The Jew of Malta", but filled his Jewish character with bitter, angry humanity, which led to despicable deeds, so that his audience didn't know whether to hate him or to sympathise with him: that's Shylock, in "The Merchant of Venice". This is the man who took an old comedy with a happy ending, "King Leir", and turned it into a bleak, violent, nihilistic tragedy with one of the most heartrending denouements in all of drama.
And into his comedy of misunderstandings, where all the fuss is "about Nothing", Shakespeare inserts all sorts of problematic characters. I won't go into Don John, a really dark, ominous and troubling characters. I won't detail the bloodcurdling curses Leonato makes to his daughter when he thinks she is a whore. I won't go into the way callow Claudio believes (on very little evidence) the charges against his loyal wife.
Don Pedro is a bit of a problem, I think. For a start, he seems to be "friendly" towards Claudio in an incredibly passionate and committed sort of way:
My love is thine to teach. Teach it but how,
And thou shalt see how apt it is to learn
Any hard lesson that may do thee good.
He makes a sad sort of botched proposal at the party to Beatrice, who rejects it out of hand. And at the end, he's left with no wife at all. Benedick shouts to him, just before the end,
Prince, thou art sad. Get thee a wife, get thee a wife!
And he doesn't respond. Make of that what you will!
Hope it helps!
Don Pedro is quite an elusive character in Much Ado About Nothing. As befits his social position, other characters defer to him, such as when he insists to Claudio that he will woo Hero disguised during the masque ball. His function seems to be that of a matchmaker within this comedy - he brings about the union of Beatrice and Benedick and Hero and Claudio, and could be said to be the director of the scheme to convince Beatrice and Benedik that they are in love with each other. He can be compared to his brother, Don John, in how he uses his power, as unlike Don John, Don Pedro attempts to use his power for positive ends, yet interestingly, he is just as manipulative as his brother (but in a positive fashion).
It is noteable that he is the only one of the three male "heroes" to not be married at the end, and he is reported to look "sad" after Benedick urges him to "get thee a wife". This is left unexplained - perhaps he really loved Beatrice and was upset at her refusal of him.