Device Protection (Device Security) stands as the flagship new feature of Android 5.1. While Android has boasted security functionalities like remote phone locating, remote data wiping, and screen locking with passwords, they all fell short when it came to device theft. If a device fell into the wrong hands, perpetrators could simply reset the operating system and continue using it as normal, rendering all security measures ineffective.
Device Protection on Android 5.1 allows users to remotely wipe data without clearing the device's password. Consequently, an Android device becomes useless to anyone who doesn't know its account credentials. Device Protection is also activated in fastboot modes or during boot using programming tools. Thus, Device Protection bears a striking resemblance to Apple's Activation Lock feature, which the company has implemented across all its devices since iOS 7.
Future devices bundled with Android 5.1 will come equipped with Device Protection support. However, Google has also retrofitted this feature to certain older devices, including the Nexus 6 and Nexus 9, through the 5.1 update. Presently, Motorola has also introduced Device Protection to the 2014 Moto X model via the 5.1 update, distributed over-the-air (OTA).
- Set up screen lock with pattern, PIN, or password - Signed in to a Google account
Once your device is logged into a Google account, when you set up a screen lock password, Android 5.1 will provide a reminder notification about the Device Protection feature as shown below:

References from greenbot and androidpolice
** Something Worth Knowing >>> What's New with Screen Pinning on Android 5.1?