Twitter did tell him to buzz off at first. That was the point of the poison pill. Then he offered stupid amounts of money at astonishingly good terms. All along the way he took shots at Twitter that reduced its value.
Twitter’s shareholders voted to accept the deal at his offered price. When Musk wanted out the shareholders weren’t interested enough to even vote a second time.