It's because stackoverflow, like many sites, uses a widely accepted 960px page container width standard.
Within your full-width footer container, put a second, invisible container for the content, whose width is the same as the width of the main document body, e.g. 960px. Here is stackoverflow's body container:
#content {
margin: 0 auto;
width: 960px;
min-height: 450px;
}
And here is the container for the footer content:
.footerwrap {
margin: 0 auto;
text-align: left;
width: 960px;
}
Additionally, I don't think the footer 'sticks' to anything. It's simply at the end of the document, so it's rendered at the bottom of the page. I might be wrong as I haven't looked at stackoverflow's html source in that much detail, but anything else seems like overkill.