Right from history, Spain are known for this style of football, the tiki taka play is their known trade mark and they have stock to it for many decades and don't look to stop it now. They played well against Morocco and created few chances because Morocco had a very solid defense and were able to read the game and understand the tactic and attacking strategies which made it so difficult to break their defense. We just have to give Moroccans the credit and not entirely blame Spain for the loss.
Yup, don't think enough people give credit to Morocco, and too much discredit to Spain. On another day, they might have gone through and then no one would be talking about it -- do think they're just not flexible enough when other teams do prove they can adjust to the opponent.
Morocco to go one better this round, though? They now must also prove they can adjust to a Portuguese team who know how to play the same battle of attrition.