Avoiding the risk of opioids

Dear Mayo Clinic: If opioids are such a problem in our country, why are they used so often to treat pain? Aren’t there other effective options for controlling pain that aren’t as risky?