With VLAN, a LAN network can be segmented into different groups, and data in group A cannot be forwarded to group B or other groups, which improves network security and simplify management. As the following figure shows.
Then why VLAN is needed in networks? VLAN reduces the exclusively broadcasts by logically segmenting a large network into many smaller ones, controlling broadcast traffic as well as improving network efficiency.