According to your functions, if you want to redirect users when they are visiting the website’s homepage. You could implement the is_front_page() function to detect and only redirects if they are on the frontpage.
function user_homepage() {
if ( is_user_logged_in() ) {
$args = array(
'field' => 25,
);
$user_homepage = bp_profile_field_data( $args );
if ( is_front_page() ) {
if ($user_homepage == 'Sports') {
$redirect_to = home_url('/sports/');
wp_redirect( $redirect_to );
exit;
}
else if ($user_homepage == 'Tech') {
$redirect_to = home_url('/tech/');
wp_redirect( $redirect_to );
exit;
}
}
}
}
add_filter('login_redirect','user_homepage',10,3);