The idea that it's wrong comes from religious institutions (and from ethical, legal, and honorary other sources)
On religious grounds, it is immoral due to it threatening your place in the afterlife
On ethical grounds, it is immoral due to death being difficult to work around
On legal grounds, it causes issues with the way law has to be handled, and unless supervised always leaves room for doubt
On honor grounds, it is immoral to leave everyone you know for reasons that are superficial
Obviously, exceptions to all of the above EXIST, but between the above and some other sources that I didn't think of, it's very compelling to not kill yourself.
Unless you're OP, in which case kys