PHP echo stripping formatting in Advanced Custom Fields [closed]

The problem is that the_sub_field() echoes the Subfield, so in your conditional the field company_name gets echoed.

However, this function does not return true, so the conditional is not met.

You need to use another if statement:

if ( get_sub_field('company_name') && get_sub_field('company_name') != '' ) {

    // echo it

}