The "Exclude from sales" is stored in the field stock_master.no_sale and it's usage is affected by the field stock_category.dflt_no_sale.
Line 620 of includes/ui/ui_lists.inc:
$sql .= " AND !i.inactive AND !s.inactive AND !s.no_sale";
blindly checks the presence of any value and may not discern the nuances of different values for it in your design unless changed accordingly.
Other files that use this field are:
inventory\manage\item_categories.php
includes\db\items_category_db.inc
inventory\includes\db\items_db.inc
inventory\manage\items.php