My explanation of it.
People are seeming to think they imagined the devil but my idea is this the devil wasn't as much imagined but he took the form of the leader of Clean Madrid and the ultimate irony was by taking a human form he had made himself weak and while the baby was dead the Anti-Christ so was the Messiah as evidenced by the guy being electrocuted.
The devil knew when he saw them in goat form he'd been beaten but still he tried to win. But by Angel signing his soul to the devil he had in fact averted the Apocalpyse, yet the devil wasn't going to give up.
The end was to show that the devil was real but since he taken a human form he was killed easily for now. And the ultimate irony was no one knew they had done so.
It was a trip it was real in my opinion the drugs just made the task seem all the more strange and surreal. But I do believe without a doubt that devil figure he saw on the scaffolding was the real devil.
To prove this remember the death metal head was laughing his head off on the building he knew he had won because the devil couldn't kill them he had growled at them and walked away.
These are simply my thoughts on the movie, which I consider a masterpiece.