General consensus is that there was likely more to it than meets the eye.
The greatest likelihood is that Lou did this as a preemptive measure. Meaning, Trotz likely was giving no indication about whether he'd re-sign when his contract expired next summer.
At the same time, Lambert was sought after and it was about time for him to be a head coach. He interviewed with Anaheim just last summer. He had likely let management know that he desired to take the next step, sooner rather than later.
So, instead of waiting until this time next summer to quite possibly lose both of the guys who he would like to have coaching this team, Lou used the input gained from this past season to dismiss Trotz prematurely, only to then retain the guy he'd have liked to have following up on Trotz anyways.
That Lambert was first announced a week later was clearly out of respect. You don't sack a guy and announce his internal replacement on the same day.