Two parallel wires carrying currents in the same direction attract each other due to magnetic interaction between two wires carrying currents because the current in a wire produces a magnetic field and the magnetic interaction is of attractive nature when current in the two parallel wires is in the same direction.
The two beams of electrons travelling in the same direction will be a source of both an electric and magnetic fields. Due to magnetic interaction, there will be force of attraction between the two moving electrons but due to electrostatic interaction, there will be a force of repulsion between them. If the beams of electrons are moving slowly, the electrostatic force of repulsion between the electrons dominates the magnetic attraction between them.