Well if the government's primary purpose is to secure the safety of it's citizens, then suicide COULDN'T be legal. Government would be derelict in it's duties to allow suicide, using your logic. Can they stop suicide, even against the law? Nope, because government cannot be in every home, every car, every garage, on every bridge, etc. to make sure no one is doing such.
Government can pass laws to make abortion illegal. Could it stop them... only after the fact.. once the act is committed, but they cannot stop it from happening, correct? No, they can't. Why is that? Because again, government cannot be in every doctor's office or hospital at every moment of any given day.
So you see.. the long and short of it is this. When a person is committed to doing something, regardless of it being suicide or abortion, they WILL find a way to do it. My question for you, how do you propose government, who's primary duty is to secure the safety of it's citizenry, uphold it's primary duty when it comes to abortion and suicide?