because any electric charge in motion creates a magnetic field. The magnetic field lines run in concentric circles around the wire (the "direction" of the field follows the "right hand rule"). You can verify this by connecting a length of wire to a small battery, and placing a compass near the wire.