It appears to be that in one project there is a "modules" element in Web.config
<modules runAllManagedModulesForAllRequests="true" />
which allowed routing module to work properly with image requests. It is placed in Web.config by default and for some reason there is no such xml element in the other project. Though this is a solution for a problem I found a better one:
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
This enables only one (instead of all) managed module for any type of requests. After adding these xml elements to Web.config the GetHttpHandler of ImageRouteHandler gets hit as intended.