Get a book on electrical wiring and you will see that a lot of wiring is run in walls. Especially one outlet, to the next outlet, to the next, etc.
This is to save cost on wire. Shortest distance is a straight line.
But when running wires through walls, there are a lot of studs to drill holes through. So If I am running a wire from one room through the next room and on to another room further away, I'll run it in the ceiling or attic. Then I don't need to drill a bunch of holes.
Also drilling too many holes or very large holes in studs will weaken them. Might want to get a construction code check book when covers all codes including plumbing. Then this will tell you how large of a hole you can have in each stud depending on if it is a bearing wall or not. (Look in plumbing section.)
As to leaving dead wires in walls/ceilings, as a general rule I don't do this if I can remove the old wire. Then there is not a bunch of old wires running all over the place making it difficult to trace circuits. (Hummm... Where does this wire go to?) I don't know if there are any code rules on this?