Your French customs friends were simply acting in contravention of EU law. This is not unusual in France.
The Freedom of movement between Schengen countries is not contained within the SIA documents as such since the actual legislation is not aviation-specific.
French Customs officers have the right to search any flight, regardless of whether or not it is involved in a cross-border flight - they may not insist that a intra-Schengen flight lands at a specific airport.
2D