Meta is making a huge shift towards artificial intelligence (AI), even as it cuts thousands of jobs. The company is investing heavily in AI infrastructure while restructuring its workforce. Meta CEO Mark Zuckerberg says AI does not automatically mean people will lose their jobs. Speaking on Complex's Idea Generation, Zuckerberg said AI should help employees become more productive instead of replacing them, adding that higher productivity could create more jobs in the future.Meta lays off 8,000 employees while accelerating AI investment and cloud computing plans, boosting stock but raising Wall Street concerns over margins and costs. (REUTERS/Carlos Barria /TPX IMAGES OF THE DAY/File Photo) (REUTERS)His comments come just days after Meta carried out one of its biggest workforce reductions. The company recently eliminated around 8,000 jobs, or about 10% of its workforce, as part of a major restructuring, according to Firstpost. The layoffs affected several departments, including Integrity, cybersecurity and content design teams.Meta reshapes workforce for AIUS employees who lost their jobs received severance benefits, while Meta is moving around 7,000 employees into AI-related roles. It is also removing around 6,000 vacant positions as part of its restructuring.During Meta's recent earnings call, Zuckerberg said AI can complete many tasks that previously required larger teams. Because of this, the company believes some departments no longer need to be as big. Meta plans to spend between $125 billion and $145 billion on capital expenditure this year. This is almost double last year's spending. Most of this money will go towards building AI data centres, buying specialised AI chips and training advanced AI models inside Meta Superintelligence Labs.CNBC reported that Meta will sell unused computing capacity to businesses. Bloomberg also reported the company is deciding whether to sell access to its AI models or simply rent out raw computing power. Wall Street welcomed the news.Also read: Why FEMA is cutting thousands of jobs and why a federal judge refused to stop itMeta stock jumps on cloud plansMeta's stock jumped 9% in one day, its biggest rally in more than five months, as investors liked the idea of new revenue beyond advertising. Investors have been asking Meta to find ways to earn money from the hundreds of billions of dollars it is spending on AI infrastructure and data centres.In April, Meta increased the upper end of its 2026 capital spending plan by another $10 billion, taking the total to $145 billion. To help pay for these massive investments, Meta also raised $25 billion through a bond sale. Around 98% of the company's revenue still comes from digital ads. So far, most of Meta's AI investments have mainly improved its advertising business.Why Wall Street is worriedBut Wall Street also sees a downside to Meta entering the cloud business. Selling cloud services usually requires large enterprise sales teams and customer support operations, which are expensive. That means Meta's profit margins could fall.Cloud businesses usually earn much lower margins than Meta's advertising business. Meta currently has one of the highest profit margins in the technology industry. Its latest gross margin was 82%, while its operating margin was 41%, as stated by CNBC.Google shows the riskGoogle's business shows why investors are cautious. Google's advertising business earns an operating margin of about 42%, while its cloud business earns only around 18%.Paul Meeks said Meta already has one of the strongest business models in technology because of advertising. He warned that moving into cloud computing could lower the company's overall profit margins. Meeks believes Meta would earn better returns by using AI to improve its own products and services instead of entering the highly competitive cloud infrastructure business.Overall, Meta is trying to balance three big goals at once: cutting costs through layoffs, spending billions to become an AI leader, and finding new ways to make money beyond advertising. According to reports, investors are excited about the new revenue opportunities but are also preparing for lower profit margins if Meta becomes a major cloud computing provider.