It is highly improbable that over the years top rankers have been having high interest in one subject, any subject. Are you kidding me? That too the subject has remained the same in almost all IITs and for many years.
Computer Science is being chosen because it provides high paying jobs in rerputed companies. You are in demand every where. The environment is challenging and competitive. It becomes good place to learn a lot and students find it attractive.
Some people are interested as well but most of it is driven by incentives.