An increasing number of consumer devices (mostly smaller and more portable ones) feature advanced digital diddling of the signal, often with venerable “name brands” attached such as “Dolby”, et.al. The attempt is to give you a “better sound experience” by doing wierd things (like combining low frequencies into mono, processing it and then playing through both speakers, etc.) This kind of thing could very well cause symptoms as you are describing in some (but not all) situations.
Note that listening to out-of-phase channels on headphones will never give you the cancellation you will hear when playing through a pair of speakers through the air. Unless you have a big hole through your head.
This kind of out-of-phase problem can also come from trying to use the wrong kind of adapter when coming from an XLR microphone into a stereo 3.5mm mini-phone input, etc. Indeed, there are a dozen different things that could have caused your symptoms, and we don’t know half enough about your details to hazard a guess at what it might have been.
But good on you for testing playback on a variety of devices to discover this problem before publishing the final mix.