When you place an object with position:relative and use left:0 and top:0 then you are in fact not moving it anywhere as you rightly stay.
However yoyu are creating a stacking context for nested elements and for the element itself.
The parent of a positioned element is the nearest ancestor that has a value defined for the property position.
Therefore the parent of the relative element in your page will default to the html root element (the body outside of margins).
To make the td the parent then the td needs to have position:relative set also and then it will become the parent for the relatively placed div.
Positioned elements and static elements are obviously treated differently once you add positioning propeties to them.
<div id="test" style="position:relative;top:0;left:0;"></div>
I assume the same may hold true for offsetParent but thats not my area so perhaps someome else will confirm.