England were looking comfortable on 220-3 with captain Joe Root and Malan both on half-centuries with three overs remaining in the day.
However, Australia produced a devastating spell of bowling as they took the new ball with Mitchell Starc taking the wicket of Root for 83.
Bairstow came out, instead of a nightwatchman, and only lasted seven deliveries after edging Josh Hazlewood to Tim Paine to turn the match back in the hosts’ favour.
“I was a bit surprised, but you know, I think it’s left up to the batsman that’s next in to make the decision,” said Malan.
“Good on Jonny for making the decision, unfortunately it didn’t work but that’s the game of cricket.
“It just shows what Test cricket is like, you make one mistake and suddenly you let the other team in. We would have liked to be three down tonight with all our batters left tomorrow.
“It didn’t go to plan, but if we were three down tonight then we would have loved to be 400-plus tomorrow. Still no reason why we can’t get there, especially if we get through this new ball tomorrow.
“If we can get as close to 400 as we can, with the two spinners and hopefully it breaks up and it turns.”
Early rain softened the Sydney outfield as England struggled to make runs, but Malan - who notched his third half-century of the series - believes the tourists can still post a competitive total.
“I found it quite tough to score,” he added. “There wasn’t a lot of pace in the wicket and the ball was pretty soft.
“On a different day, maybe take a few more risks but I felt I’d rather grind it out than just give it away.
“It is a fine line of ‘do you go attacking? Or do you just stick in?’ Thankfully, I got away with a few things today.”
Australia bowling coach David Saker believed his bowling attack deserved the wickets at the death and was particularly happy to dismiss England captain Root.
He said: “It equalled the game up. I think we deserved it, we bowled some really good stuff throughout the day but didn’t get a lot of luck.
“It was a pretty even day for both teams, tomorrow will be a tight day.
“He (Root) looked destined for a big score. It was a great wicket for us and that exposed the last few overs for Jonny Bairstow, so that was nice to get him as well.”