It is a tradition in our culture, but not the law, simply because the male lineage has been dominant since the middle ages. In other cultures, it is done differently. Since, until the advent of DNA proof, the mother was the only "sure bet" parent, some cultures use the mother's lineage as the dominant one.
Neither one satisfies our geneological urge to know our roots on both lines of our ancestral tree unless copious records are kept. One side or the other is repressed with time. So, we use the one that comes with our culture. However, cultures change due to internal and external forces. The current trend to use both parents' names in some fashion, or even create a new name for their progeny is evident that we are in a stage where our cultural is changing.
By law, we can give our children almost any name we wish. It does NOT have to be the father's name.