Upvote:3
The purpose of the Schengen treaty is to remove internal border controls for EU citizens. They already had the right to cross those borders, Schengen just reduced the probability of being delayed by a check. Obviously open borders must be open for citizens and non-citizens alike, or the citizens would have to stop at the border and show that they are citizens and thus entitled to cross.
On the other hand, Schengen visa may put some restrictions on the holder. Most importantly, visitors may have to provide a premise and an itinerary for the trip and they are expected to tell the truth. When people apply for a Schengen visa, the officials try to judge if the applicant can be trusted to follow the terms of the visa.
Yes, you can easily cross from Spain to the Netherlands and spend more time there than in Spain. If you happen to get caught, e.g. because you're involved in a traffic accident and somebody wants to see your papers, you have a problem. Not so much because you crossed that border, but because you lied about the premise of your trip.