Bret Hart took a long break because he needed one because he was so burnt out from his wrestling for so long so Vince McMahon decided to let Bret have his break.
By 1996, the WWF was so struggling at that time because of losing many of their talents to it's rival competition WCW, steroid trials, paycuts, and lawsuits they really had to deal with.
When Hogan turned heel after being a Superhero for a decade and the formation of nWo stable, a mature-like WCW began on taking a family-friendly and cartoony WWF in the Monday Night rating wars. This led to WWF losing money and was almost towards the point being bankrupt(similar to one WCW had in 2000).
By 1997, the WWF then realized their old cartoony concept of the 1980s and early 1990s was too stale and they had too many outdated ideas so they decided to go in a more raunchy, adult-oriented model, and made wrestlers that are just like human beings in real life in which Trash TV was popular at that decade.