This short speech by Macbeth is his response to the news that Lady Macbeth is dead. It is not as emotional as Macduff’s response to the death of his wife and children, but instead is quite poignant and philosophical. A soliloquy might have been more expansive on his thoughts and feelings.
It is a reflection on the brevity and meaninglessness of life. Every day we live is someone else’s last, and our stories are full of noise and bother, but ultimately pointless.
Perhaps he anticipated her death, given her descent into guilty madness. His observation that “She should have died hereafter; There would have been time for such a word” suggests that he thought he had bigger problems at that point, and he simply didn’t have time to grieve properly. Implying that her timing was inconvenient is the kind of self-interest that those who love to hate Macbeth might find satisfying.
Either way, Macbeth’s musings on the futility of life contrast profoundly with his belief in his own invincibility and his headstrong determination to fight to keep the kingdom he usurped by killing Duncan and blaming it on his bodyguards.
It just goes to show that you can not encapsulate a character in one quotation or by examining one event. Shakespeare’s leading characters are complex, conflicted individuals designed to provoke thought and conscience. Macbeth is no exception.