Note: I am talking about
If you check the function
_wp_get_current_user(); you can see the following statement:
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use wp_get_current_user() instead.
Why does WordPress have these types of private functions? Why doesn't WordPress allow to use these types of functions for WordPress plugin or theme developers?