Why does the daemon require peers in order to start mining? I wanted to start mining Bitcoin from the genesis block, so I cloned Bitcoin and removed the checkpoints. Then I compiled and started up the daemon. I wasn't connected to any other peers, however, so it wouldn't let me mine. I did ./bitcoin-cli setgenerate true but ./bitcoin-cli getmininginfo said I had 0 hashespersecond. When I connected to just one other peer, though, (a peer which also didn't have the checkpoints or the block chain), I could start mining. 

Theoretically, though, why wouldn't the peer just let me mine on my own chain and not broadcast my results to anybody? I know it's not really a peer-to-peer network in this case, but I don't see why it would harm anyone to allow mining like this. Where in the v0.9.3 code does it essentially say "if not connected to peers, then don't allow generation"?
I wanted to start mining bitcoin from the genesis block


I'm pretty sure regtest will let you do that.


  why wouldn't the peer just let me mine on my own chain and not broadcast my results to anybody?


Because that would be pointless. You're not confirming transactions, and you won't get rewarded for your mining. Your chain will probably be overwritten the very next time you connect to the network.


  Where in the v0.9.3 code does it essentially say "if not connected to peers, then don't allow generation"?


Here:

if (Params().NetworkID() != CChainParams::REGTEST) {
    // Busy-wait for the network to come online so we don't waste time mining
    // on an obsolete chain. In regtest mode we expect to fly solo.
    while (vNodes.empty())
        MilliSleep(1000);
}


It's here on versions after 0.9.3:

fMiningRequiresPeers = true;


This commit  changed it.