To be fair, it's the fact that Williamson supposedly released confidential information that got him fired. In a letter to Williamson, May wrote that she needs to be able to trust the people in her cabinet so that she can have frank, private conversations. May also revealed that she was concerned with the way in which Williamson engaged with the investigation into the leaks, suggesting he may have been less than cooperative.
Still, this adds to the spectacle around Huawei. Most recently, the CIA has charged that it's funded by Chinese state security, and the UN has claimed that US objections to the company's role in 5G are politically motivated.
UPDATE 5/1/2019 4:15PM ET: Williamson has responded to the Prime Minister and denies his involvement in the leak. In a letter shared by Reuters, he wrote, "I appreciate you offering me the option to resign, but to resign would have been to accept that I, my civil servants, my military advisers or my staff were responsible: this was not the case."