The borders in EU-Europe are porous. This has to be a joke, to deport someone from the Netherlands to Spain. All the guy has to do is get on a train and he'll cross all the borders without even being checked most likely.
Well, that is absolutely true. But, I hope the Spanish authorities have laws for taking away his residence permit and expel him to Algeria.
It's worse than porous, there are NO borders at all. The guy as you say, can take a train straight back.
Also EU law says that you cannot deport someone to a country that has the death penalty. That is probably the reason he was not sent back to Algeria.