Why are traditional knobs not replaced by touchscreens in cockpits?
Adding a pilot's perspective to what others have said:

Look at the switches and knobs in an airplane up close some time. You'll notice that nearly all of them have different textures,heights,sizes or shapes. That's intentional. Pilots train and train and train and train on checklists, especially the emergency ones. Muscle memory is a big part of quickly and correctly executing an emergency checklist.

As an example, flap levers/switches normally have a cap or top that is flat and parallel to the wings. It's easy to identify solely by touch.

Checklist item: "flaps up"
Action: Hand to flap lever (automatic after doing it a hundred times in training), verify feel of lever, move, look to verify

Without the tactile element, every motion would have to be verified by looking before it's made. With the tactile element, the movement can be made and then verified visually while the hand is moving to the next item. In an emergency, every second counts and the savings from tactile + verify matters.

Beyond emergency procedures, they're simply safer. The plane I fly the most has a touch screen display and several non touch devices. In turbulence, the touch screen is basically useless. But, the important devices all have buttons and knobs. I can be banging my head on the ceiling (literally) and still adjust the auto-pilot or radio. In that kind of turbulence, the touch screen device is completely useless.