The belief was that when the first soldier lit his cigarette, the enemy would see the light; when the second soldier lit his cigarette from the same match, the enemy would take aim at the target; and when the third soldier lit his cigarette from the match, the enemy would fire, and that soldier would be shot.
I can’t speak to the mindset of people who are superstitious. I’m just repeating what the alleged basis for the superstition was.