Why do we need a gain ratio
I had the same doubt when I was doing my Master's Degree. First of all, you don't include something as random as 'IDs'. This is where data preprocessing comes in. Let's take a dataset which has users and their movie genre preferences based on variables like gender, group of age, rating, blah, blah. With the help of information gain, you split at 'Gender' (assuming it has the highest information gain) and now the variables 'Group of Age' and 'Rating' could be equally important and with the help of gain ratio, it will penalise a variable with more distinct values which will help us decide the split at the next level.