Because that’s how you want it to be, nothing more, nothing less. It’s a design choice. You can use one, both or none. There is no technical reason why one should be preferred over the other. It’s entirely down to how you want things to appear visually.
Please consider a less restrictive view. It is not a black and white matter of necessity, it is a gray matter of context.
The <ul> and <ol> elements have {margin:1em 0} and {padding-left:2.5em} by default. Coders may (or may not) assign {margin:0} to the list element to eliminate the vertical margins and may assign {padding:0} to eliminate the {padding-left:2.5em}. Whether he does or not depends on the context in which the list is being used and the way it is displayed.
The setting depends on context. A horizontal menu compared to a vertical menu provide classic examples of when the margins and padding might be used or not.
The padding-left provides room for the default list markers to show. It is is removed, the list markers disappear.
The ul and ol elements have default margin and padding applied by the UA therefore you need to remove them when you don’t want those properties affecting your layout.
The li element has no default padding or margin so you don’t need to add those rules for it.