It's increasingly common for a studio to begin developing sequels ahead of a movie's release, enabling a second picture to get into production faster than it normally would, and at a comparatively low cost. Warner Brothers began pushing 'The Hangover' as the movie's prerelease buzz began to grow, though it did not close deals until after the movie had begun raking in box office dollars.
Warner Brothers is keen on developing new franchises, with Holmes with its broad fan base and rich source material considered a very appealing candidate. The project would also mean Downey would star in a second franchise after 'Iron Man'.