Hummels can be amazing for large parts of the game, but he makes way too many mistakes, takes too much not very wise risks, and has lapses of concentration. No matter how good you are, or how much ability you have, when you make mistakes that often, you can never be considered a top defender.
That being said, I would not say Bonucci is better than him. Even though I agree with the general sentiment that Hummels is definitely overrated.