Android is an open source OS made by Google which lets the developers customize it at their own will. To use Google Apps (or GApps), Android device makers need to follow a set of rules under Compatibility Definition Document (CDD), also needs to follow the Compatibility Test Suite (CTS) before preloading the Google apps and services on their smartphones.
It was all possible for all some companies and unscrupulous vendors to preload Google apps and services on uncertified devices. Now, Google is blocking these devices from running Google Apps on them. Custom ROMs will still able to run the GApps without needing a certification from Google. According to an OEM/ODM source, Google started to lock out all the new firmware from running the GApps sometime in March this year.
This change is in effect from March 16th and will affect all the firmware built after this date. Some users are facing this issue for a year but it could be fixed easily by clearing the Google Play Services’ data. After the change, this data clear workaround doesn’t work anymore and these locks will now be enforced in more stringent manners. Google won’t allow the users to sign into their Google account on a smartphone which is not certified. For a workaround, there are some options like flashing a custom ROM on your smartphone or entering your Android ID on the Google registration page. If you are a device maker then you have to contact Google to have the device whitelisted. Google did all this to tighten the CTS (Compatibility Test Suite) which will make the device makers go through a proper certification channel. Google is letting the custom ROM users use the Google Apps and services without needing any certification for now.