Why does medication for parkinson’s produce an on/off effect?

Dose? Depends on the medication but some parkinson medication required "drug holiday" to allow the drug to clear and be restarted, some medications work differently causing brekthrough symptoms. It could be that dosing needs adjusted as well.
Maybe it Doesn't. I hope I understand your question. The on/off effect is the nature of parkinson disease. Although overall general nature is slow progression over time, there are times that symptoms are better and times they are worse. This is the nature of the disease and not really the nature of the medication.