The importance of the psychological aspect in programming is tremendous because the mind is on heavy use for a prolongued time, especially its higher functions.
The psychological state of the programmer is usually less regarded by corporations and many people. Despite that, the resulting source code and the perception that the user has on the application is a result of how programmers feel and are able to make decisions, assemble and design the application.
Decisions are taken at the emotional level in any human being, then processed by the rational part of the mind. These two parts, the emotional part and the rational part have to be aligned because if there are too many discrepancies, the decisions are damaged and so is the creative force of the mind.
The emotional level is disturbed by a lot of factors, i.e. always rushing programmers to do things in very short time, which is the trend in many companies. If you want a clear example of that, check out what game programmers that work in large corporations say about their schedule and pressure, and then look at how these games have lots of issues, bugs and are effectively only money making machines. This is a whole subject to discuss, but it reflects very well what you asked.
If you want a very good example, check out the game Cyberpunk 2077, what it has promissed, what the company has delivered and then look out for what decisions the management has taken.
All the bad decisions in terms of time and money that management takes reflect as bad behaviour and pressure on the programmers.