People use opioids medically because of their pain-relieving, and recreationally because of their calming, euphoric effects.