How is it that some people are able to function normally even with only 4-5 hours of sleep each night?

Quality not quantity. Sleep occurs in 4 stages: stage 1 is the lightest sleep, stage 4 is the deepest (aka rem or rapid eye movement) sleep. Your ability to function depends on getting sufficient deep sleep as this is the sleep that allows you to wake up feeling refreshed and ready to take on the day. Some have trained their bodies to get to stage 4 sleep quickly, almost bypassing stages 1-3. Talk to your doctor.