insert into select with union needs derived table
Try this it will work

INSERT INTO phppos_categories (name) 
SELECT DISTINCT category FROM phppos_items 
UNION 
SELECT DISTINCT category FROM phppos_item_kits