Why, in The Hobbit: The Desolation of Smaug would Sauron send his legions to Erebor before Smaug had fallen. It couldn't possibly be to negotiate with him. As powerful as Azog is in these films, I'm sure Smaug would just say no and eat him.
Essentially, the films got several things wrong key to this story.
Azog is not even alive at the time of The Hobbit. Azog was killed at the Battle of Azanulbizar in 2799, while the events of the films take place in 2941.
The orcs at the battle of the five armies were not from Sauron. They were primarily from Mount Gundabad and Moria, as well as small colonies throughout the Misty Mountains.
Sauron was not openly very concerned with Erebor at the time. Sauron's focus was in returning to Mordor, though these preparations were not as obvious to the Wise, and so Sauron easily withdrew from Dol Guldur and into Mordor when the White Council moved against him.
So to analyze this situation from the book point of view is impossible. And to analyze it from the films can only be done by chalking it up to "the needs of the screen".