Stopped at Schengen airport with valid residency card

I travelled to Schengen just two times with the Portuguese residence permit, one of which it now.
A month ago in Dusseldorf no issues, no stamps. Just a quick question on the reason of the trip.
Yesterday when I’ve arrived to Lisbon with my 15 and 18 y.o. kids, the immigration officer said that he’s really wondering why minors don’t have visas, while they should. Also he has stamped the passports, which I did not expect… Summer, relaxing time…