|Your manager said he is not paying you to think, and it is possible that his manager has the same attitude toward him. If he were thinking, he would not make a comment that is so insulting, degrading, and in direct contradiction with the most basic element in management, namely treating people with respect and trust.|
At the same time, one could say that you were given an assignment, ignored what you were supposed to do, and came back with work that was totally off the wall. It will be important for you to maintain regular contact with this manager or any future manager when you are thinking about diverging from a given assignment.
If your current manager had merely been upset because you strayed from the assignment, that would not necessarily have been a major problem. The real issue is that he does not want you to think. You are expected to do your job exactly as he says. In some highly structured jobs, this is not uncommon. However, if you seek a position where you can implement some of your own ideas, innovations, and strategies, this is not the position for you, nor is this the manager for you. You should look around the organization to see if this is the company for you.