Why do most smartphones not have a physical keyboard?

The vast majority of smartphones sold today use a 'bar' or 'slate' form-factor, with a large screen which uses an on-screen keyboard.

Blackberry are the one obvious manufacturer who still produce smartphones with physical keyboards, but their market share has declined from around 20% 6-7 years ago to around 0.2% now.

iPhones have never had a physical keyboard, and there are only a few examples of Android phones being produced today that have a physical keyboard.

What caused this decline in the use of physical keyboards?

(More interestingly) What is the impact on the UX of mobile devices?

EDIT: Interestingly there are also a few examples of physical keyboard accessories which can be added to iPhones, like the Typo (RIP) and the Boxwave Keyboard Buddy which adds a Sidekick-like keyboard.

This also includes the slider form factor where there is a full size screen, plus a keyboard which slides out like the Blackberry PRIV. enter image description here