Mauro Icardi's brace against his former club, coupled with further goals from Walter Samuel and Rodrigo Palacio, ensured Inter of a first win in five league matches.
It also kept their push for a UEFA Europa League place on track but the result could have been different had Maxi Lopez converted an 18th-minute penalty, while Eder was shown two quick yellow cards soon afterwards.
As it was, Inter moved out of sight after the interval but Mazzarri believes his side could struggle in future if they turn in similarly sluggish first-half performances.
"Today we won, even though we played badly in the first half and Samp deserved more," he told Sky Sport Italia.
"Sampdoria were pressing us, got to the ball quicker and that wasn't the kind of performance I want from my side. After the break we adjusted and realised what we were supposed to do.
"As we've seen today, if you score at the right moment then the result won't necessarily reflect the performance.
"We need to be consistent throughout the game and keep that mentality to never get distracted. If we want to win, then we need a different approach to the one we had at the start."
Icardi was undoubtedly the star of the show, as he scored twice before being substituted - perhaps due to having been cautioned for an inflammatory goal celebration.
With tensions high due to Icardi's much-publicised relationship with the ex-wife of former team-mate and Sampdoria striker Lopez, the Inter man cupped his ear at home fans after opening the scoring.
Mazzarri agreed the gesture was uncalled for but said he was pleased with Icardi's temperament during the match.
"He shouldn't have done that gesture with his ear, but for the rest (of the game) he showed a really cool head to deal with the environment that had been created around him," he added.
"He can become a great centre-forward, as he has goals in his DNA and we have told him many times he needs to focus only on playing football.
"Both Icardi and Maxi Lopez are professionals and they need to set everything else aside when they step on to the field. They are under the eyes of everyone and have a responsibility to the fans."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.