Without padding, any border that you add to an element such as this paragraph is very close to the content; not always the desired result.
Even a small amount of padding gives the content some visual breathing space. Note that the padding area around the content also takes on the background color; it makes perfect sense that the background color extends to the border and does not just color the area behind the content itself.