The above function works by creating an entry in the wp_bp_friends table with a value of 1 for the is_confirmed column, however the default friendship request action is still being executed which adds an additional entry to the table saying unconfirmed.

So we have both a confirmed and unconfirmed entry for the same friendship. This means that on the user profile page it will appear as if you have both a confirmed friend and have a friend request from the same person.