Spain still is a very cruel country where animals are concerned. Animals are abandoned easily like they were never part of a family.
Thank God for Animal Charities. Also I will never understand people hurting animals for fun.
To answer your question: no, this is not a local custom just some stupid people trying to be "macho".
If this act was directly reported to the police, which it should have been, they would be fined big time!
In this way Spain has changed slightly, people can now get fined due to the new Law of Protection of the Animals.
Next time you or your friends witness something similar, do not think twice and call the local police (tel.nr always on your mobile phone) or 091 (emergencies police).
Have a lovely St. Valentine's day!