Fact 1: electricity is used as an energy source by electrical devices. 
Fact 2: Of course, computers are electronic devices, and as such, they deal in electrical terms.
Electricity is used for energy by computers.