p elements can't contain block elements, only inline elements
so it gets implicitly closed when it sees the ul, which is a block element
then the closing tag becomes superfluous. now, the rendering engine may enter a quirks mode to make it look like it appears like the ul is inside the p for styling purposes. the algorithm for that might be in some html5 spec document.
you can run the document through http://validator.w3.org/
to get more detailed errors and warnings