A single underscore before a name is used to specify that the name is to be treated as “private” by a programmer. It's kind of* a convention so that the next person (or yourself) using your code knows that a name starting with _ is for internal use.
Why underscore is used in function name?
The underscore prefix is meant as a hint to another programmer that a variable or method starting with a single underscore is intended for internal use. This convention is defined in PEP 8. This isn't enforced by Python. Python does not have strong distinctions between “private” and “public” variables like Java does.
Why do some functions start with underscore?
The underscore prefix is reserved for functions and types used by the compiler and standard library. The standard library can use these names freely because they will never conflict with correct user programs. The other side to this is that you are not allowed to define names that begin with an underscore.