Why does engine cut off after idling for awhile?

Those stupid little magic cans have tripped me up a time or two. If they are not grounded they don't work. And neither will the engine run. Yet they can run for a million miles when they feel like it,lol.

I had a guy want me to do a tuneup on his Volvo marine engine because his fishing boat died and wouldn't start out at sea.
He had it towed in to the tune of $2,300
He bought all the parts MINUS the condenser and I asked him to get one, but he said they either work or they don't. (I knew better) but he wouldn't listen, so I did the tuneup using the old one.
Next time he took it out the same thing happened about 25 miles out and cost him another $2,300 to get towed in.
He was pretty pissed off at me now, and demanded I go find out what the problem was.
I connected it up to water and let it sit there and run on the trailer and about 1/2 hr later it started missing and sputtering.
I went to my toolbox and grabbed an old condenser I had in there and grounded it to the distributor casing and touched the lead to the coil + wire and it smoothed out and ran fine.

$1.29 part cost him $4,600 because he wouldn't listen to reason and knew better than the mechanic he hired to do the job.