Chazal forbade stam yeinam even in benefit, like wine poured to avodah zarah. The Tosafot and the Ran explained that they gave it the law of true yayin nesech, lest people permit benefit from that wine. As the Rashba wrote, at first they forbade it only in drinking, and a later court added the prohibition of benefit.