Isn't it just bad luck if you hurt others mentally if you commit sucide?

I heard it's really bad to commit suicide because it's like your hurting others. I get this but why is it baddd?

Ur either hurting yourself or helping people