Let’s break this down a bit…
Primarily privately funded buildings
Teams built their own buildings primarily out of their own pockets in every Canadian market (except for Calgary and Edmonton) as well as the major American markets (plus Vegas and Columbus).
Public money tied to expansion/relocation
Teams received significant public contributions to bring an NHL team to town in Calgary, San Jose, Anaheim, Nashville, Tampa, Minnesota and Carolina. (In Calgary’s case, the Olympic discussions also played a big part, but it’s unlikely they would’ve built an arena only for the Olympics without an NHL club.)
They were worried team would leave
Public funds were provided to contribute to new arenas for St. Louis, Buffalo and Glendale, in part due to concerns that the teams would leave town without a new home. (The Blues had almost moved to Saskatoon in 1983 and the Kiel Center’s construction, combined with new local ownership, helped cement the team’s roots.)