To maintain the order of elements(tabs) as defined in xml configuration and to avoid duplicate elements. With HashSet alone we can't guarantee the order.