Cristiano Ronaldo set up Mateo Kovacic's 37th-minute opener and added a second shortly after half-time, but the four-time Ballon d'Or winner was not spared from the barracking that occurred during an unconvincing opening spell from Zidane's men.
Madrid crashed out of the Copa del Rey in midweek at Celta Vigo to extend a slump of one win in five matches heading into the Sociedad match, but Zidane felt his club's fanbase broadly fell into line with pre-match pleas for unity from the likes of Ronaldo and captain Sergio Ramos.
"We must thank the Bernabeu," he told a news conference, having seen substitute Alvaro Morata add a third after Sociedad centre-back Inigo Martinez was sent off.
"Sometimes we are bothered by some whistles but today the fans have been very good and altogether achieved something very important, I think.
"It is a very important victory for us after a few difficult days. It was a very complete match against a complicated opponent.
"It was very important to keep a clean sheet and, in addition, the other results have favoured us."