Why HP had to do something

The news that Hewlett-Packard has decided to split itself into two companies should not be a surprise. Hewlett-Packard had to do something to focus the company. At present, they have two separate business units going in the opposite direction and it has become destructive to the combined company's stock price. Investors just can't look past the dead part of the company.

Simon Dawson | Bloomberg | Getty Images

The company's enterprise division is focused on goals similar to the vision painted by IBM years ago. It's clear in the technology space that servicing companies with software solutions and other enterprise solutions is where margins and business growth are centered. This division has been the growth engine for Hewlett-Packard for years and even during the disastrous tenure of Leo Apotheker, it was proposed that dividing the company into two separate units would allow the enterprise division to not be saddled by legacy businesses.

Read MoreFormer HP chair: Spinoff not a defensive play

Computers and printers are clearly a game dominated by scale and low margins. It's exactly the reason why IBM shocked the technology world and sold the ThinkPad division to Lenovo. IBM saw the future and was proactive. HP now is a believer that dividing the firm into two distinct business units will allow the overall company to not be weighed down by compressing margins in computers and printers.

The eager minds in the investment-banking world are generally shifting toward dividing conglomerates into more effective business units. The prevailing perspective is that more value and a higher stock price can be derived from separate companies. In the short term, HP gained $3 billion in market cap in one day as investors reacted positively to the split announcement. But let's be clear that stock prices alone do not necessarily guarantee businesses will gain advantages as a result of breaking up.

Read MoreiPhone 6 users are literally tearing their hair out

I applaud Meg Whitman for being willing to make an adjustment to her previous decision when she overruled the breakup strategy outlined by Mr. Apotheker. And really, what choice did Hewlett-Packard have? They are getting killed on margins as the printer and computer business becomes perpetually commoditized. This type of weight around the company can oftentimes mask opportunities available to businesses in other divisions.

At Hewlett-Packard, this news will no doubt cause anxiety as more layoffs are likely to come as the company right-sizes to better fit today's business environment. This is an unfortunate reality and will likely be replicated at large technology companies as global competition heats up. In the case of Hewlett-Packard, for example, they are competing with Lenovo in the computer and printing business. Lenovo is a Chinese company with massive cost advantages.

Read MoreHackers who breached JPM targeted other financial institutions

The Hewlett-Packard announcement this week makes sense. It doesn't mean by any stretch of the imagination that HP's worries are over but the company had to try something to turn its fortunes around.

Commentary by Michael A. Yoshikami, the CEO and founder of Destination Wealth Management in Walnut Creek, California. He is also a CNBC contributor.

Disclaimer: Neither the author nor Destination Wealth Management own shares of HP or any other companies mentioned in this article.