Why user profile update creates Additional Capabilities

Finally found an issue. Something in WP saved role but could not compared correctly and couldn’t find correct capabilities.

This code worked as it should (note the case):

$role = get_role('new_role');
if(!$role){
    add_role( 'new_role', 'New Role', array( 'new_cap' => true ) );
}