When you cut into a whole onion, the knife can transfer anything on the outside to the inside. Same for handling the outside.I usually discard the outer 2-3 layers since they can be papery and tough. I would imagine this helps.
I'd guess that washing the onions before cutting might help more than anything.
___