What Ryota did was not justified. I understand that.
The thing is, pretty much every appearance he had in the despair arc was him suffering or preparation for things to get much worse for him. He’s been used by pretty much everyone he’s met. He’s suffered over and over again.
The only scene he see of his childhood is of him being bullied and unwanted. Later, he meets Junko who manipulates the methods he was using for his anime (HIS DREAM) and she ends up using them for the exact opposite of what he wished for. His final scene in the despair arc was him alone, watching the world around him fall apart. He feels guilty about everything that’s happened and thinks it is ALL his fault.He’s been pushed to BEYOND his breaking point way before this. He’s gone through a lot of traumatic experiences that I’m not shocked are causing him to go to an extreme.