Answer :
That is because he had great support in the congress due to his participation in congress duties before he became the president. Another thing was that everyone was supporting Kennedy who was assassinated, so when Johnson showed up and supported Kennedy's policies, everyone jumped aboard as it was like supporting Kennedy himself.