In general, there should be no passport control for flights within the Schengen area. (Officers can stop you informally and ask to see your passport, but you will not pass through the formal control point and you will not receive a stamp.)
When you arrive at a Schengen airport from outside the Schengen area, you normally have passport control unless your departing flight is going outside the Schengen area.
Usually when I do this same flight I'm coming via another flight from the UK and there is security before the 1st and after the 2nd flight.
Security aside, the immigration controls in this case should be in Amsterdam only, where you go through the entry checkpoint on arrival regardless of whether you leave for Geneva immediately or days later. In the opposite direction, you would encounter the exit checkpoint in Amsterdam and an entry check at your UK destination.
Usually when i fly between schengen countries I hit passport control -I guess this comes about because though I may be going between schengen countries, very often its not a direct flight and many of those changing onto my second flight come from outside schengen.
This is a bit puzzling. The way this works at most major Schengen airports, including Schiphol, is that part of the airport is "in" and part of the airport is "out" of the Schengen area -- international. Flights arrive in one part of the airport or the other depending on where they're coming from. To transfer to a flight in the other part of the airport, a passenger has to go through the appropriate passport control checkpoint depending on the direction (in to out or vice versa).
If you fly from London to Geneva via Amsterdam, your first flight deposits you in the non-Schengen part of the airport and your second flight leaves from the Schengen part of the airport. You have to go through passport control to get there. If some passengers on the second flight had come from Munich, they would have landed in the Schengen part of the airport, so they can get to the departure gate without going through passport control.
it's random. I'm unlucky in getting this most of the time.
If you're experiencing "informal" a.k.a. "non-systematic" controls, this is it. These will have been far more common during COVID-19 as well as during times of elevated fear of terrorism or concern about refugees.
it's based on the flights manifest and whether any single passenger is connecting from a non schengen country. That is if one guy is coming from a UK flight onto the Amsterdam to Geneva one then everyone has to get their passport checked in Geneva.
If your getting checked in Geneva is related to the manifest, it won't likely be because of passengers originating outside the Schengen area, since those will have been stamped into the Schengen area in Amsterdam, but rather because of more specific intelligence about some passenger being perhaps wanted by the police or perhaps traveling on a passport that raises some suspicion. I encountered some checks that seemed to be of this nature in Oslo years ago; the agents didn't even open the passports of most people when they saw from the cover which country had issued them. These agents came to the jet bridge to screen the arriving passengers.