They do it. The pics aren't really uploaded, they're searched by the Google-bots and they do their Google-math and decide how the image will come up. It's an index If you want to increase your chances of coming up, make sure you name your pictures with keywords, and put text in the page that describe the pictures.

From their site:

"Google analyzes the text on the page adjacent to the image, the image caption and dozens of other factors to determine the image content. Google also uses sophisticated algorithms to remove duplicates and ensure that the highest quality images are presented first in your results."