There are two or three concurrent discussions here, I think, and some resulting confusion. How a basic light fixture works in general is one thread. How a badly-wired light might be a hazard is another. And how pulling a neutral from another box is bad is yet another.
A regular light fixture should have only two wires: incoming hot from a switch, and outgoing pseudo-hot back to neutral. No third wire (separate hot or neutral) should be needed.
If the original fixture was wired incoming switched-hot to bulb to ground, I can see the problem. Very bad, but if there are no permits and inspections in the area it’s easy to see how it happened.
If the fixture was properly wired but a true third neutral is needed, that sort of explains what the electrician did… but doesn’t justify it.
Need more info from the OP.