That is pretty much how most legal regimes operate, yes. Then there are the ones that outright criminalize suicide.
Edit: as for why, it’s been shown in some studies that making access to methods difficult does reduce suicide. Cynically, maybe doing that keeps a workforce at better strength.