Why does ubuntu need reboot after upgrade but centos doesn't?
That is not true.
Ubuntu does not need a reboot after an upgrade/update of a kernel. It is adviced to do so so the new kernel become active but there is no "need" for it.
And is it possible to safely run a ubuntu-server for a long time without reboot?
Our record for Ubuntu is an uptime of more than 7 years (yes, it ran far longer than the support from Ubuntu lasted).
===
Oh and CentOS also tells you to reboot when there is a change in kernel. See for instance: https://www.redhat.com/archives/rhl-list/2009-July/msg00195.html
The kernel case is obvious; installing a kernel is useless without a reboot.
But in other cases the new stuff will be used together with the old one.
For example, replaced libs will be used by programs freshly started, and old
libs will be used for programs already running.
So, the reboot is not strictly required. maybe you may want to restart
some services or applications.