Senate President Pro Tem should not become US President

I’m not sure why. As soon as he would become president, the speaker wouldn’t be a congressman anymore. Would you prevent Kerry for running for presidency because he’s a senator? One day senator, the next day president. What’s the difference with the speaker becoming president?