That's the major difference between hubs and switches.
As a generalisation: hubs just push everything received from one port out to all ports.
Switches are cleverer in that they only direct the right traffic (that may include broadcast traffic) to all ports.
Of course, there are cheap 'switches' that are nothing more than hubs.