They do not.
There are hundreds, if not thousands, of poppy varieties that produce no morphinan alkaloids.
Morphinan alkaloids become "opium".
https://www.poison.org/articles/what-to-know-california-popp...
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10017456/