I think it's a bit of both/and. The Samson story within the context of Judges is about people doing what "that which was right in [their] own eyes," and the people of Israel devolving into madness and dumbness because of their rejection of Yahweh and his law.
I think he's purposefully supposed to come off as a buffoon, but maybe a relatable one?