Because suicide is not a solution.
Hannah killed herself and didn't give a chance to people who could have saved her, Clay loved her and didn't get a chance to do anything to save her life. So he means to say that Hannah did a bad thing killing herself.
He even asked the priest:
Clay: And do you think Hannah is going to hell because she killed herself? I don't.
Priest: I think the God I believe in, a just God, would have mercy on a soul like hers.
And if God forgives her, we should. Source: springfieldspringfield
So his thinking of Hannah's suicide being a bad thing can have religious backing too but in rest of the show he don't show any religious sign.