The simplest answer is his overconfidence
When Magnussen first meets Sherlock to negotiate the return of the evidence embarrassing to Lady Smallwood, he sends his goons in first to secure the environment and search Sherlock and Watson. This happens at Baker Street. At this point Magnussen doesn't really know what he will face and may be wary of Sherlock.
Later, two things have happened. Sherlock has saved Magnussen's life or at least interrupted an event that could have led to his death and distracted his assailant who seemed about to kill him. Since the assailant shoots Sherlock, you could argue that Sherlock took a bullet for him. Also, Magnussen has managed to get plenty of dirt on Sherlock and, as a result, may be more confident in facing him.
So Magnussen may be overconfident. Also, he invites Sherlock to his home base, sending a helicopter. Moreover, he is expecting to beat Sherlock in the negotiation for Mycroft's laptop. It seems that he has predicted Sherlock's strategy and wants to lord it over the detective by showing that his plan to facilitate a security search of his base to uncover his secret files won't work. Again, this might contribute to overconfidence on his part. Therefore no need to search Sherlock.
It is also worth pointing out that it isn't at all obvious that Sherlock planned
to shoot Magnussen.
Sherlock looks like he didn't expect to be bested by Magnussen. He could be putting on an act, but maybe he really was surprised to be beaten and improvised a new strategy on the spot. His actions are certainly unprecedented and a shock to Watson and the audience (making at least 4 mindf**ks in a single script).