What's the spirit of the statement except to say what it says? It claims that the morality of an act is determined by an individual's motives. When we examine a moral case, the gauge of its goodness or badness is the individual's motives. It reduces morality into whatever the individual's motives are.
An extreme case to prove a point is called an argument by example. I provided an example of something that we would never accept as moral, but, under the statement, would be moral. The example I provided was extreme, yes, but it is extreme to avoid grey area of lesser cases. It shows that something about the acts and consequences of a moral situation also matter and sometimes matter much more than the intention of the agent.
The agent's motives are important in determining the morality of an agent, not the moral act itself. This is especially apparent when we start to look at bad acts with bad consequences. The morality of a bad action doesn't change just because the agent intended some good to come out of it. It might lessen the culpability and wrongness of character of the agent, but it does not determine the morality of the entire moral act.