After the news this morning that Twitter will lay off 336 people, or 8 percent of its work force, we began looking for information to add a “Why” to the “What.” We found that the move is mostly about the power structure within Twitter.

Re/code reported last Friday, and a letter from CEO Jack Dorsey confirmed today, that Twitter is reengineering its engineering organization to make it more focused and agile. Twitter wants to employ people with skill sets “purpose-built” for the product roadmap.

“We feel strongly that Engineering will move much faster with a smaller and nimbler team, while remaining the biggest percentage of our workforce,” Dorsey said in the letter to employees announcing the cuts.

Dorsey has also said he believes Twitter needs to “clarify ownership” of projects and products. That’s probably a diplomatic way of saying there are too many cooks in the kitchen at Twitter.

Square and Twitter cofounder Jack Dorsey.

Above: Twitter cofounder and CEO Jack Dorsey.

Image Credit: Square

Our sources close to Twitter say Dorsey and company are likely trying to “flatten the management structure” as a way of both cutting costs at the top and making development more agile and streamlined.

Twitter is probably cutting out a lot of middle managers in the engineering and product teams, our sources say. This will dramatically reduce the number of people who can claim the authority to direct development teams’ attention to this feature or that product.

The line between people like Dorsey and Adam Bain (who has done a lot to build marketing-friendly features into products) and the rank and file who write the code will be far more direct.

“Middle manager is a tough role in agile environments,” explained VB Insights analyst Jon Cifuentes. “The people who do the building can do it themselves.”

As Re/code reported, quite a few observers have criticized Twitter for becoming “bloated.” The company has more than doubled its workforce to well over 4,000 since its 2013 IPO.

Cifuentes said developer engagement and contentment is surprisingly low worldwide, and blamed it, at least in part, on poorly designed management structures.

“The idea is that if we could ‘solve’ for the employee engagement problem, there could be huge cost savings, particularly for big companies,” Cifuentes said.

Twitter apparently believes the layoffs with eventually yield big benefits: It reported in its SEC filing today that getting rid of the 366 employees will cost the company up to $15 million.

The stock market reacted negatively to Twitter’s announcement today, even though Dorsey’s decision to lay people off was likely meant as a clear signal to Wall Street that he’s willing to make tough decisions when necessary.