Has the US PGA Championship always been played as stroke play?

No. The US PGA Championship was originally a match play format when first held in 1916 and continued as matchplay up until 1957. It became a 72 hole stroke play event in 1958.

More about the US PGA Championship

In 1957 the event started to lose money.

In 1958 the PGA decided to change the format to stroke play, with the standard 72-hole format of 18 holes per day for four days, Thursday to Sunday.

Main reason for the format change was that network television broadcasters were preferring a 4 day event building up to a large group of well-known contenders playing on the final day.