Something to do with the ticket not including arrival taxes for Spain/Schengen maybe? So not a disallowed under immigration law so much as a governmental revenue protection thing?
how long was the layover?
(note that I don’t know this is the case. It’s just something i’ve heard offered up as a reason for admission on a layover before)