Vinegar is usually a mixture of water and between 4 and 5% acetic acid. This versatile acid can mix with water, oil, alcohol and almost any other kind of liquid -- even gasoline -- reaching places that other cleaning products can't. When dissolved in water, acetic acid breaks into two components, the hydrogen and the remainder of the molecule, called the acetate. The hydrogen will try to bond to any molecule that it encounters, acting like a third wheel that weakens the molecule's structure. These hydrogens are great at cleaning stains made from alkali substances, like soap, urine, and limestone.
The acetate component has an extra electron that hangs off the molecule. The electron acts as a magnet to other atoms, especially metals, to make new molecules. For example, the acetate reacts with molecules in rust and grime and changes their makeup so the water can dissolve them. Acetic acid also gets rid of odors by killing off the bacteria and fungi that cause them. Its acidic nature destroys the cell structure of bacteria, and it stops fungi from turning sugar into energy.
https://www.networx.com/article/the-science-of-vinegar
So not by magic, no, but actually there doesn’t seem to be any hard evidence about its ability to remove residue due to pesticides.