Though the exact implementation is circuit-dependent (obviously), I think the intent is probably always the same.
With regard to the rear wing: it combats the effects of normal span-wise flow that tend to reduce the dynamic pressure of air flow under the wing along its central-most section. It's a problem exacerbated by the presence of support pylons that can cause separation on their own.
Remember when Lotus tried to exploit this behavior with passive DDRS?
F1 aero used to be a lot of fun
With regard to the diffuser: any sort of low-pressure wake will increase the size of the "pocket" into which upwash from the diffuser is directed. That's why we see teams take advantage of the free 7.5cm on either side of the car's centerline to affix elements that increase the size of the wake, especially near the diffuser.
EDIT: It's also why brake ducts have so many elements.
We saw a precursor to the monkey seat at Monza in 2010, and teams ran them last year in Belgium. Those circuits are hardly downforce-critical.
That said, I think the monkey seat is probably the most overhyped feature of a car. Because they're very visible and tend to change frequently, people talk about them too much.
In my view, they exist because, "why not?" And they're continually optimized because F1 engineers would optimize fart delivery if given the opportunity.