We all like him because he's the best ninja we've ever seen here, besides maybe Danzo.
He "lost" because Naruto is telling us that (traditional) ninjas aren't the way to go. Naruto himself sucks as a ninja.
The lesson you're meant to draw from the fact that the best ninjas are all the worst people is...ninjas are shitty. They're murdering low-lifes with a thin vaneer of pop culture coolness. And that being a "good" ninja shouldn't be anyone's goal in the first place.