Why do most doors have a knob or handle that must be turned to open the door?

There're many doors that don't have a handle or knob that needs to be twisted to open them. These are usually in public buildings. You either push or pull to open the door. Why do other doors have knobs or handles that must be turned to open them? Is it just to prevent a person who leans against an outward-opening door from falling over and getting hurt?