They're not necessarily. Many times different eggs are hatched underneath a broody hen. The eggs sometimes have different parents. Also depending on how old the eggs are the rooster may have been killed and a younger roo could have taken his place. **However, hens can carry the original roo's sperm for a short period.
If you have only one of each and have pure breeds, you may be able to tell. Or if you have a limited number with certain traits, like barring or comb type, you can sometimes get some pretty good information. But with many of our flocks, there is no good way to be sure.