Do you mean the lock (or sleep or power) button? It also ended the call in iOS 9 and before when just using the phone as it's typically used by holding it to the ear (which turns off the screen too). It doesn't end the call if you are on speakerphone, headphones, Bluetooth, etc.