Under what circumstances can the Initial Climb Area extend more than 2 nautical miles?
The definitive reference for this stuff is the TERPS, and it says that the ICA can extend to 10NM(!). See 14-1-6(b):


  Length. The ICA length is normally 2 NM, measured from the ICAB to the
  ICAE along RCL extended. It may be less than 2 NM in length for early
  turns by publishing a climb gradient. The ICA may be extended beyond 2
  NM to maximum length of 10 NM. A specified altitude (typically 400
  feet above DER) or the interception of PCG route must identify the
  ICAE.


I may have missed it, but I didn't see anything in the TERPS that explains how to set the length. However, the ICA definition from the IPH says (emphasis mine):


  Initial Climb Area (ICA). An area beginning at the departure end of
  runway (DER) to provide unrestricted climb to at least 400 feet above
  DER elevation.


I couldn't find a formal definition of "unrestricted" but in ATC-speak it usually means "go for it" (e.g. ATC Orders 4-3-2(e)(1)). In this context, though, I think it means "no lower limit" rather than "no upper limit". In other words, the ICA will be extended to allow for 'worst case' scenarios where an aircraft's climb rate is extremely limited.

That suggests hot and high airports, and if you look at the ODPs for a famously high airport like Lake County (Leadville), CO (KLXV) at 9,934' MSL you'll see that the departure procedures are indeed almost straight, e.g. 
DAVVY ONE, which is more or less straight out for 20NM from runway 34.