When dealing with currency exchanges, it's important to remember that only the local currency is "money", all the other currencies are just "things".
This is the reason behind the "buying"/"selling" terminology you often see. When you change foreign currency into local currency - in the view of the currency exchange - they are buying your strange pieces of paper with fancy writing on it for actual (local) money. And when you're changing local currency back into foreign currency, they are selling you fancy pieces of paper for real (local) money. (This viewpoint extends even for electronic transactions. It might not be a physical artifact, but it's still some "non-monetary" electronic claim, like a transferable airline e-ticket or shares of company stock.)
So to directly answer your question, the reason there's a different rate on different bills is because, as non-("real")-money objects, they're non-fungible. One US$100 bill and five US$20 bills may be very similar, but they're not the same, and can't be freely interconverted by someone in India.
It's similar to when you go into a grocery store and they sell a 2 kg package of rice for a different price than two 1 kg packages (and a different price again for 2 kg of rice from a bulk bin). It's the same amount of rice, but due to the economics of obtaining and storing the two 1 kg packages versus the one 2 kg package, as well as the different rate at which the 1 kg packages are bought versus the 2 kg packages, the store sets the price differently such that they maintain a decent profit while not having extra packages languishing on the shelves.
Likewise with the money exchangers. They have some non-("real")-money commodity (US$100 and US$20 bills), and even though five US$20 bills are the equivalent amount of "rice" as one US$100 bill, there's different economics in obtaining and storing a US$100 versus the US$20. There's also differences in the desirability of a US$100 versus five US$20s. As such, just like the grocers changing the price of the different packages of rice (or bulk rice), the money exchangers may change the price of US$100 versus US$20 (or electronic transfers).