The function wp_get_current_user() lives in wp-includes/pluggable.php. WordPress loads this file during the bootstrap process. If the file is not loaded, the function does not exist and PHP throws a fatal error.
The error appears when core files are missing, corrupted, or unreadable, or when a plugin or theme calls the function before WordPress finishes loading. The call happens early in the execution flow, so the function definition is not yet available.