You were entering the Schengen area - the group of European nations who have a combined border - once you enter one of those countries you can freely travel to the others (so no passport booths on the roads on the borders between the Netherlands and Italy) - your flight from Amsterdam to Milan was an internal flight.
If you had flown into Amsterdam and transited to Moscow you would have gone thru metal detectors to the departure lounge, but not thru immigration
You traveled to a European city to a European city a Milan to Amsterdam flight would be a domestic flight. Did you need to go through customs again in Milan