In fact programming is particularly good at teaching you how to think. Programs are literally built out of ideas. Which is one reason it's still a good idea to study CS in the AI era. It's still important to be able to think well.
'Learning to program teaches you how to think. Computer science is a liberal art.' -- Steve Jobs