There is no real origin. Or rather, no actual "thing" that inspired its creation other than it containing the long vowel sound (ee) which generally promotes a smile - being that it is probably the best sounding word with such a sound considering the word "feet" also has the same long vowel sound - but I imagine if you said "say feet!", you'd probably get the same reaction from people you're photographing. Also, the word "cheese" is a colloquial for "grin" or "smile" (for the same reason, I'm thinking).
EDIT:
@honky -- True...........but being that there is no real origin of the phrase, as it relates to photography, who's to say? Maybe they said "feet" first, and decided that cheese is a little less.......smelly -- get it, smelly -- cheese....har.
"cheesy", I know.