Installation of apps not distributed by Google is by default blocked by Android for security reasons. However, it is possible to install unofficial APK packages on Android systems. Many application testers or programmers run such applications for testing purposes or during development process. Some publishers may find it hard or even impossible to publish their applications on Google Store due to various restrictions and limitations imposed by law, such as age restrictions.
It is worth emphasizing that not all .APK packages are safe. Unofficial APK app installers can never by fully trusted as they may contain malicious code that can damages the systems or gain access to certain system resources without user consent. Using social media apps or logging to bank account on a compromised system, user risks a serious data leakage or potential extortion attempts. Should user want to install such application, it is critical that they verify what resources the app wants to gain access to and immediately turn off option to allow installation of apps from outside the Google Store.
To summarize, not all unofficial Android apps are a system security or integrity threat, yet the risk is always present. APK packages obtained from verified sources should not present any threat, but those obtained otherwise on the contrary – such packages should be avoided at all cost or tested before installation, for example, by using a free Android system emulation software.