Sure it is. If someone steals your gold, you can call the people with guns to arrest them and get it back to you (often). It doesn't have to work 100% of the time to be an effective deterrent.
However fiat money must be protected by people with guns against forgery. With one exception: people in power are allowed to counterfeit it, thus robbing the common people, under protection of people with guns.
Gold and Bitcoin are immune to both types of forgery.
You only get a net positive income for producing gold if the price is higher than the cost of production.