They are used to mark the end of a line in a text file. or to make html code more readable. try writing a php script that creates a large webpage without them and it all tends to be on one line.
i.e. try running this
<?php
for ( $loop=0; $loop<100; $loop++ )
{
echo "number is ".$loop."<BR>";
}
?>
on screen the page looks fine but if you do a view source is just runs on one line. But if you stick \n after the <BR> the source is a lot easier to read. Ok poor example but it does show what I mean.
the \r is needed by windows. I had problems with a file written on a unix system when it was transfered to a windows machine because of the missing \r
I Hope that explains it.
Mark.