I don't quite think Eko's death was as irrational as some people think. From his flashbacks, we see that Eko isn't afraid to do horrible things if he doesn't have a choice. He didn't feel bad about killing to save Yemi. After Yemi's death, he took on the role of being a priest out of sheer guilt. His remorse for his actions was really guilt for Yemi's death. On the island, when he met with Yemi's apparition, he confessed that he feels no guilt for the things that he had done. He did them because he had no choice. The guilt was for Yemi's death, not for his actions.
Now, as for why the monster killed him? He saw Eko was not willing to be controlled. Eko's faith was a means of keeping him under control, a way to manipulate him. Once the monster saw that this was not going to work, he killed him off as a possible threat. Contrast this to Locke. John is also a character of faith, just like Eko. The difference in the two is Locke's undying devotion to the island, or what he believes to be the will of the island. In reality, it was nothing more than Jacob's enemy's will and manipulation. Assuming the smoke monster is the man in black, or on the same side as him, it becomes clear that Eko was a possible contender for the loophole until his confession to Yemi's apparition. The man in black, through the smoke monster, killed Eko when he realized he was not going to be useful and cooperative. He then turns to Locke and uses him instead of Eko for his plot to kill Jacob.
As for Locke's "specialness" from the beginning? Perhaps the man in black was using both John and Eko, testing them to see who would be a better candidate for his plan or loophole. Eko just happened to fail the tests, and met his death as a result of his lack of "faith", his unwillingness to be controlled by the island's will, and his own free will. It was around the time of Eko's death (slightly prior to it, to be specific) that Locke regained his faith, and it may be there that the man in black saw Locke as a better candidate, and decided to kill Eko. Locke may have even interfered with the first attempt to kill Eko: the polar bear. When that failed, the man in black resorted to using the smoke monster to finish him once and for all.