In short kokichi is an asshole cuz he had to, and anyone would be in his situation tbh cuz it's a fucking killing game
And outside the kg (like DR S, salmon team and FTE's) he was just a childish guy and a jokester, and he has more to him like any other character.