Stimulants work because ADHD brains have whacked out dopamine regulation. Stimulants help smooth out the peaks and valleys associated with ADHD. Hyperfocus = overstimulated by dopamine, inattentiveness = understimulated. Taking a stimulate provides a consistent baseline level to help reduce the extremes.
Stimulants work because they activate the underperforming portions of the prefrontal cortex related to attention management.
Chalking it up to dopamine is a gross simplification.
Adderal, for example, stimulates the release / reduces the re-uptake of dopamine, norepinephrine, epinephrine, serotonin, histamine, and CART peptides.