What is the purpose of using PHP to bypass a proxy server and obtain the original IP address?

When a user accesses a website through a proxy server, the website sees the IP address of the proxy server instead of the user's original IP address. To bypass the proxy server and obtain the original IP address, PHP can be used to access the user's IP address from the $_SERVER superglobal variable.

if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
    $ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
    $ip = $_SERVER['REMOTE_ADDR'];
}

echo "User's original IP address: " . $ip;