The Shazam app's longstanding success in the technology world is a testament to the utility of an app that can quickly recognize music from any source, and Google has taken a page from Shazam's book with its 'Now Playing' feature. Not only does Now Playing function in much the same way as Shazam, but it adds additional functionality in that it doesn't require any button-presses whatsoever. The always-listening phone feature presents the names of songs directly on the lock screen, saving time for songs that are only playing in glimpses.
The constant listening required by the Google Pixel in order to make Now Playing work might seem worrisome, but the function doesn't actually send any data to the cloud. Rather, it analyzes songs from a local "fingerprint" database of over 70,000 tunes. This means that it isn't quite as versatile as a service like Shazam, but it's also far faster.