I am just guessing here, but when I think about the possible origin of the idea "good developers think about cost and revenue, bad developers think about code", I imagine something like this:

* There are stories about how two or three people started writing code in their garage, and became billionaires later.

* Some guy thinks: "Huh, I happen to have an empty garage and some extra money... perhaps I should hire two or three nerds to write code and make those sweet billions for me."

* A few years later: The nerds wrote some code, and it works relatively quickly and flawlessly... but the promised billions are still not coming. The boss is frustrated, because this is not how the stories have described it.

* Now the boss could blame himself for being gullible, or for not noticing the selection bias (just because some nerds made billions, doesn't mean all nerds do). But it is psychologically more convenient to blame the employees.

* He cannot really blame the employees for writing bad code, because the code happens to be good. So instead he blames them for, essentially, not doing his homework, too.

In other words, I would expect this to happen in small companies. Most strongly when there is no intermediate layer between the company owner and the software developer.

A large company has people, such as managers and salespeople, who are responsible for minimizing costs and maximizing revenue. The software developer may feel the result of this pressure -- if the situation is bad, there may be slow computers, small screens, and a lot of overtime -- but the developer is still expected to focus on coding, not to make financial decisions.

Trying to look at the problem from the perspective of the boss... hey, of course I would like to own a pet nerd who is great at coding, but also at making his colleagues redundant, and who works hard on maximizing my revenue! The only question is why would such person work for me, as opposed to starting his own company and maximizing his own revenue. The more perfect I imagine my hypothetical employee to be, the less it makes sense for them to be my employee.

-

More seriously: people have different skills and traits. There are skills and traits required to be a good software developers. There are skills and traits required to be a good entrepreneur. Some people are blessed by nature and have both these sets. Some only have one of them. Some have neither.

If you happen to be a person who could become a great developer and also a great entrepreneur... and you happen to work as a developer now... it is useful to remind you that you are probably using the less profitable of your options. That you are either not using the skills that are highly rewarded by market, or you are using them in order to make some other person rich instead of making yourself rich. Such advice may encourage you to start a new career, and perhaps improve your life.

But saying that you are not a good developer unless you are also an entrepreneur, that's wrong. From that perspective, Mark Zuckerberg would be a better developer than Donald Knuth. Nope, that's stupid. It is something entirely different to say that you would rather be Zuckerberg than Knuth. That is a legitimate preference, and if you have what it takes, go ahead. But I don't think that Donald Knuth or any other coder should have a professional identity crisis whenever he catches himself thinking about something other than cost and revenues.