Writers will often give their protagonist a flaw. But why do we like this?
A flawed protagonist is someone we can relate to. We all have something we struggle with.
Characters that have flaws help the author create suspense and drama. The writer will put the protagonist in situations where they have to act despite their weakness. Their actions will often be atypical because they have to compensate for their imperfection.
Flawed characters can give us encouragement. When we see them triumph, we can take a bit of inspiration from them.
Memorable characters are well rounded. We love them for their achievements, flaws and all.