I cant understand that. If there isn't a material that makes it hard to pass, why there is a resistivity $\approx 377\Omega$ in vacuum?
There is no resistivity in the vacuum (resistance would imply dissipation and nothing dissipates in the vacuum). There is only impedance. The impedance gives you the ratio of electric to magnetic field in an electromagnetic wave. This ration is dependent on the unit system chosen. In SI units it has the dimension of a resistance. You can choose other unit systems where it is just 1.
Definition of resistivity:
Electrical resistivity (also known as resistivity, specific electrical resistance, or volume resistivity) is an intrinsic property that quantifies how strongly a given material opposes the flow of electric current. A low resistivity indicates a material that readily allows the flow of electric current.
So you are using the wrong word.
The value you give $\approx 377\Omega$ applies to electromagnetic waves , not to currents, as by construction the vacuum has no charge carriers and therefore no currents and resistance to their flow.
It describes the impedance of free space , a different concept even though the units are the same.
The impedance of free space, Z0, is a physical constant relating the magnitudes of the electric and magnetic fields of electromagnetic radiation travelling through free space. That is, Z0 = |E|/|H|, where |E| is the electric field strength and |H| magnetic field strength. It has an exact irrational value, given approximately as 376.73031... ohms.
As far as Maxwell's theory goes , it is the same reason as the one that the electromagnetic waves have a fixed velocity in vacuum.
If Z_0 were zero the velocity of light would be infinite!
The value of the velocity of light is a fact that was predicted, verified experimentally and extended to any zero mass particles by special relativity and general relativity. It is part of the general relativity model for space time. One may then think space time as the medium which impedes the passing of the wave.
There is no resistivity in vacuum. You are familiar with RLC circuits right? R dissipates the energy in the circuit. Where as L and C stores the energy in the circuit. The same happens here. The vacuum stores and releases energy as it passes through the vacuum. In a perfect vacuum, number of photons emitted = number of photons received. But, in other mediums, number of photons emitted > number of photons received.
Though there is 'nothing' in the space, it have some ability to 'hinder' that means, if you could put the 2 leads of a Ohm-meter, you would get a very high resistance reading (very low current).
Just think of a Cathode ray tube. So much strong voltage is required to create the current through that low-pressure gas (though not a perfect vacuum)
Whereas, if you could connect the leads of your ohm meter, with a small piece of metal wire, you'll get a very low-resistance (high current in spite of low voltage).
Because 'free-electrons", special-type of electrons in metals, cause this Easy conduction. In case of electrolytic solution (say salt-water), ions (molecules having charge) can move, that cause the current.
Space has no such carriers, so space is less conductive, ie.provides more hinderance than metals and saltwater.
You've asked, " If there isn't a material that makes it hard to pass, why there is a resistivity in vacuum?" . (It seems from common sense ... because when we (human) try to run, if there's any material in our path (say some brick columns), that hinder our movement. But it isn't case of electricity. electricity passes more easily if there's some matter (matter provides carrier). Just think, if you want to send a book, from one corner of the classroom to another corner, What will be easier? throwing the book, or to relay (pass) the book hand to hand? it is like that.
the fact is, in space, There isn't any material that could make it EASY to pass.
However, theoretically, pure vacuum's resistivity is infinity. But vacuum-space can conduct a little current (and show high but non-infinity resistance) , because,if you put some voltage in space (using electrodes), some electrons will come-out into the space (as done in Vacuum tubes, CRT etc), so the current (electron flow) itself will not allow to be a "pure vacuum". i.e. the electron flow itself will act as carrier.