The reason it cranks but doesn't start is because there's no fuel to ignite. The fuel pump needs fuel in the tank to pressurize the system and deliver fuel to the engine. Once the tank is empty, the pump can't do its job. The starter motor, however, is completely separate and will still function, thus the cranking sound.