How to perform a 3 table join with sparse lookup table
First part returns the Cartesian product of companies and products.

from       companies c
cross join products p


Then for every combination of Company - Product it checks if exists a record in the companies_products table.




select     c.id, 
           c.name, 
           p.id, 
           p.name,
           if(cp.company_id is null, 'status: enabled', 'status: disabled') as status
from       companies c
cross join products p
left join  companies_products cp
on         cp.company_id = c.id
and        cp.product_id = p.id
;



id | name         | id | name      | status          
-: | :----------- | -: | :-------- | :---------------
 1 | Test Company |  1 | Product 1 | status: disabled
 1 | Test Company |  2 | Product 2 | status: disabled
 1 | Test Company |  3 | Product 3 | status: enabled 



dbfiddle here

Or you can use EXISTS to check if there is a record that match both identifiers.




select     c.id, 
           c.name, 
           p.id, 
           p.name,
           if (exists (select 1
                       from   companies_products cp
                       where  cp.company_id = c.id
                       and    cp.product_id = p.id) 
                      ,'status: enabled', 'status: disabled') as status
from       companies c
cross join products p
;



id | name         | id | name      | status          
-: | :----------- | -: | :-------- | :---------------
 1 | Test Company |  1 | Product 1 | status: enabled 
 1 | Test Company |  2 | Product 2 | status: enabled 
 1 | Test Company |  3 | Product 3 | status: disabled



dbfiddle here