I would argue that knowing the business and the customers makes you a much better programmer though. I would rather a programmer spend 75% of their time programming and 25% seeking to understand why they are programming instead of 90%+ heads down with little thought or attention to why they are programming.
>How do you know what to code
Someone need something to be made or done, I help them by writing code.
>whether you should even be coding
I've been doing it for long time
>if you aren’t willing to spend the time knowing the business and the customers?
That's precisely the reason I prefer code. I'm not that interested or even willing to spend time knowing the business and the customers.