Programming languages are a teaching tool that lets you objectively demonstrate critical thinking. You can illustrate -- plain as day! -- how logic works, how the assumptions one makes when forming an opinion affects the result of that opinion, how to break down a question into its constituent parts, etc.. You are basically telling a computer how to "think" about something.

That said, you have to be teaching the right things. If the goal is "make a web page and learn HTML" then I agree, that is of limited use. If the goal is "learn how to work with variables, functions and flow control in Python, then -- if we have time -- hook the inputs and outputs up to a web app" then that is teaching a broad range of logic skills, with minimal technical involvement (Python's syntax is very easy to understand).