Actually large generators normally do use electromagnets today. They need an external source of power when starting, but drain off a very small part of the generated power to keep running. As jacques wrote, that isn't done with small generators because the added complexity usually isn't worth it.