Venting bathroom into attic
Electricians are usually only responsible for supplying and installing the fan, not running the ductwork. That is usually done by the HVAC guy or at least another trade or individual. If the electrician has it there contract to run the ductwork fully, then it needs to go to the outside of the house. The water vapor from the bathroom will condense under the metal roof on cooler days and cause water damage elsewhere.