It is not the strong odor of the onion, but the gas that the onion releases when we peel off this member of the lily family, makes us cry.
The onion itself contains oil, which contains sulfur, an irritant to both our noses and to our eyes. Cutting an onion arouses a gas contained within the onion, propanethiol S-oxide, which then couples with the enzymes in the onion to emit a passive sulfur compound. When this upwardly mobile gas encounters the water produced by the tear ducts in our eyelids, it produces sulfuric acid. In response to the caustic acid, our eyes automatically blink due to irritation and produce tears to flush out the sulfuric acid.
Moreover, to rid the eyes of this foreign substance, we instinctively rub our eyes with our hands, while into the act, which again exacerbates the situation, as our hands are coated with the caustic, sulfuric acid producing oil from cutting the onion.
The only remedy to get rid of this pungent, irritating oil of the onion is to boil it, and not to slice it or dice it.