He leads a company that some would consider the epitome of ruthless global capitalism. But Apple chief executive Tim Cook has shocked some in the US with an impassioned attack on the single-minded pursuit of profit – and a direct appeal to climate-change deniers not to buy shares in his firm.

Eyewitnesses said Cook, who succeeded Steve Jobs as boss of the technology giant in 2011, was visibly angry as he took on a group of right-wing investors during a question-and-answer session at a shareholders’ meeting.

Responding to calls from the National Centre for Public Policy Research (NCPPR), a conservative think tank and investor, for Apple to refrain from putting money in green energy projects that were not profitable, he shot back that Apple did “a lot of things for reasons besides profit motive”. The chief executive added: “We want to leave the world better than we found it.”

Addressing he NCPPR representative directly, he said: “If you want me to do things only for ROI [return on investment] reasons, you should get out of this stock.”