Agirretxe opened the scoring in the sixth minute and all was relatively calm for Betis following Jorge Molina's equaliser until three goals in just over 10 minutes left them with no hope of claiming a vital victory to climb from the foot of the table.
Jon Ansotegui scored the second in the 55th minute with Antoine Griezmann and Agirretxe weighing in to seal a comfortable victory before Xabi Prieto added insult to injury with a late score.
The result leaves Betis still three points adrift of safety while Sociedad remained in sixth but closed the gap on fifth-placed Villarreal to two points.
Sociedad dominated the game, and Agirretxe set the tone when he lobbed the ball over Betis keeper Stephan Andersen to give his side an early advantage.
Ruben Castro had a weak shot caught by Sociedad stopper Claudio Bravo before Molina levelled the scores in the 19th minute.
The 31-year-old striker found the end of Alvaro Vadillo's ball to slot it into the bottom left corner.
Molina went close 10 minutes later when his shot struck the post before Carlos Vela forced a brilliant save from Andersen with a 25-yard strike.
The teams left the field level at 1-1 at half-time but it was not long before the home side made their dominance count, with Ansotegui heading them into a lead in the 55th minute.
Griezmann added their third from close range seven minutes later before Agirretxe added his second and Sociedad's fourth in the 68th minute with a curling left-footed shot.
Victory had already been wrapped up but Prieto made sure the scoreline reflected Sociedad's dominance with an 85th-minute score from close range.