In some cases, it may be, not so much that a person believes the end justifies the means, but that a person believes the end proves the justice of the means.
If I tell you the Philadelphia Phillies won last night, and you check the paper (ha! No, seriously, you check online) and see that they did in fact win last night, your checking doesn't make me right, it just proves me right.
Similarly, someone might think that the defusing of a ticking time bomb doesn't make torturing the would-be bomber right, it just proves that torturing him is right. Perhaps a proof by contradiction: If it's wrong, then the bomb won't be defused, and many people will die. But the government is supposed to keep its people alive. Therefore it's not wrong.
That may be a subtler distinction than is required, but I think it's a better description of the some of the arguments I see made than saying that a good end turns an evil means good.