Sony hinted in a recent interview that the Japanese giant would supply its 8-megapixel camera sensor to Apple, most likely for the upcoming iPhone 5. But just how did this consumer-electronics rival end up supplying parts to power its most formidable opponent?

The answer may lie in simple supply and demand.

Semiconductor company Omnivision has typically been in the driver’s seat for Apple's products. The company supplied Apple with the cameras in the iPhone 3GS and the iPads.

In February it said its newest 8MP camera would be ready for volume shipment later this year. But while this may be the case, some experts contended that it wouldn't be able to meet the volume Apple would need.

Indeed, market researcher Asymco found that every model of the Apple iPhone doubles production and sales of the previous generation. The current iPhone 4 is set to sell around 60 million units by the time its successor is rolled out, meaning the iPhone 5 could sell well over 100 million units.

FBR Capital's Craig Gerra said at the time that his field checks suggested the part will not be ready by the time Apple ships the iPhone 5, which he expects this July. Because of that, Gerra said Sony would win the slot in the iPhone 5.

This theory was almost confirmed this weekend as Howard Stringer, Sony's CEO, said his company was gearing up to supply Apple with its 8MP sensor.

Stringer told WSJ how Japan's devastating earthquake and tsunami had affected 15 Sony factories. One of those factories happens to be where Sony makes its camera sensors. That slowdown would hit Apple he said.

It always puzzles me, Stringer said. Why would I make Apple the best camera?

While Sony may get some Apple business this year, Gleacher & Co's Doug Freedman wrote that he doesn't think Apple will give all of it to Sony, as they're a competitor and it's not proven Sony can deliver parts Apple needs in volume.