AI has a unique system where they operate flights inside India from the international section of the terminal. For example AI 156 is Air India's service from Moscow to Goa. So the aircraft from Moscow arrives in DEL and people wanting to go to DEL only deplane and go thru immigration. Pax to Goa deplane, go thur security and back into the international section of the terminal, and technically don't enter India in DEL. Then other passengers (like you) arrive on other international AI flights and do the same. AI 156 then departs from the international side with international pax who then go thru immigration and customs in Goa.
To make things even more tricky, domestic passengers can buy a DEL-Goa ticket on AI 156. They have to checkin at the international side and get a boarding pass with a big D printed on it. To enter the international section, they have a separate queue for domestic pax, where they bypass passport control and technically don't leave the country. In Goa, the pax with the big D can again bypass customs and immigration just by showing the boarding pass.
Flights AI 001-399 and 900-999 are such international flights.