wp_redirect does not work

The only thing wp_redirect() is adding HTTP header to the current request. It doesn’t prevent request from proceeding to further loading page and must be followed by exit statement to work correctly.

error code: 523