Why is aircraft marshalling still necessary? I've seen in a documentary that many airports have people guiding the airplanes to the parking spots (marshals). I've also noticed that the key point is to reach a precise spot on which the nose landing gear has to be placed. Couldn't that be solved with a camera installed on the landing gear itself so the pilots can check whether they go along the lines and finally reach the precise spot?
There are automated systems that provide the same function as a marshal. They are in place at some airports but not all since upgrades cost money and not all airports may see a use for it. 

At smaller fields marshals often serve multiple roles aside from just guiding aircraft they may also handle baggage, pump fuel, drive tugs and all the other various ramp jobs. In this case it may be more cost effective to keep a marshal around than instal a costly automated system that only replaces one of their jobs.