Apple (AAPL -0.41%) did what it does best last week: quietly announce a purchase that then makes headlines for the rest of the week. The tech giant confirmed last week that it had purchased music-discovery app Shazam, which is worth $400 million, according to TechCrunch.

"That's how Apple does investing and M&A [mergers and acquisitions]," said Gene Munster, managing partner at Loup Ventures, which specializes in tech research. "They don't make a big flashy announcement." 

Munster says this is a "textbook Apple M&A deal" that the company made for two main reasons. What are they? 

Hands hold an Android phone with Shazam pulled up and a coffee table with a latte stands nearby

Apple has big plans for Shazam. Image source: Shazam.

Apple leaps ahead of Snap and Spotify

First, Apple reportedly snatched up Shazam from under the noses of two of its competitors: Snap Inc. (SNAP -1.97%) and Spotify. This is particularly troublesome for both companies, considering they have partnerships with Shazam at the moment and those could be in jeopardy once Apple takes over. Munster says he expects Apple to keep the partnerships going, but said the company probably will come up with some advantages that will only be accessible through Apple Music or Apple products.

Snap hasn't had a great year after Facebook's Instagram Stories feature has been eroding Snapchat's growth and scaring investors off. However, the company is still a big competitor for Apple when it comes to artificial intelligence (AI).

Snap's AI progress can be seen in its filters that recognize faces, as well as its location tags for photos. This past May, Snap hired a top AI engineer from Facebook, Hussein Mehanna, as its director of engineering.

Perhaps Snap was thinking it could finally outdo Instagram Stories by adding a music-detection feature. But Apple made sure that wasn't going to happen. 

Additionally, while Apple Music is just a small part of the company's "services" business, Spotify is its main competitor. Spotify has long had the most streaming music subscribers. In September, Apple told Billboard it had over 30 million paying subscribers, while Spotify said it hit 65 million in September.

More importantly, Spotify is growing at a faster rate than Apple. Spotify has been adding about 2 million subscribers per month this year, hitting 65 million in September, while Apple has been adding about 1 million subscriber additions each month, hitting just over 30 million in September.

Munster estimates that Apple Music is just 10% of Apple's services revenue, which did $8.5 billion in revenue for the latest quarter. His firm expects it to grow to 13% of Apple's Services revenue next year. Apple has a goal to grow its services business to $50 billion by 2020.

How does Apple catch up with a music service that has more than double its subscriber number and is growing at a faster rate? By buying a music-discovery app that connects more than 1 billion people, according to Shazam's website. In other words, Spotify just got leapfrogged by Apple. 

Apple's smart home speaker, the HomePod, sits on a white table next to books with leaves from a plant poking out on the right side of the picture

Apple's HomePod could use Shazam's superior active-listening capabilities. Image source: Apple.

Apple's Homepod gets a boost

But snagging a popular music app from Snap and Spotify to help boost its Apple Music arm is just a bonus compared to the long-term play its technology gives Apple. "Part of the deal was defensive against Snap and Spotify," Munster said. "But it also plays into Apple's master plan around what it's doing around voice." 

Shazam's ability to listen to a song for a few seconds and determine the exact song that's playing could be a key component of Apple's future devices. A problem that has popped up on smart-home devices thus far is their ability to listen and understand questions and requests.

With Apple gearing up to release its first home speaker called the HomePod in 2018, it may be on the lookout for additional features. Adding a music-detecting feature to this HomePod, or future models, could help it better compete with its tried and true competitors, including the Amazon Echo and Google Home.

To be more specific, Shazam's active-listening ability can help make Siri the smartest of the smart assistants. And that should scare Alexa and Google Assistant. 

Summary: Apple has big plans for Shazam

Another textbook Apple move is buying something that seems simple, and then using it for something even greater. For example, Apple bought Beats Electronics for $3 billion in 2014, its biggest deal to date, but it wasn't just for its popular headphones, or its music-streaming service. Just this year, people are realizing that Beats co-founder Jimmy Iovine has Hollywood contacts that are helping Apple with its content ambitions as it looks to compete with Netflix and Amazon in that arena. 

"Things aren't always what they appear when Apple makes acquisitions," Munster said. "They'll find other ways to apply Shazam."