The fact Joff was pretty much told from the beginning that the Iron Throne was his by right and he would rule the Seven Kingdoms after his father probably didn't help how he grew up into such an entitled douche on top of being mentally insane. That and the fact his parents (legal or actual) were just horrible role models.