The Y chromosome, the sex chromosome found in male humans, was long believed by scientists to be nothing but a useless genetic wasteland, useful only as a trigger to start the fetal development that makes a male embryo develop the male primary sex characteristics. All human embryos develop according to a basically female template until a certain point, after which the presence of a Y chromosome may cause the embryo to start developing male traits. It isn't the whole Y chromosome that triggers this development, only a gene named SRY, and it was long held that this gene was the only important gene located on this tiny (approximately half as large as its X counterpart) chromosome. The rest of the chromosome consists of largely repetitive DNA, and it was widely believed that this was because genetic erosion had slowly destroyed the chromosome over the millenia it has existed, and that it (and therefore human males) was threatened with extinction. Some pop science journalists speculated that the species would have to develop human cloning to survive in a future setting where the species would consist only of females.
The little bastard turned out to trick them all. During a recent mapping of the Y chromosome, several fascinating phenomena were discovered, including the reason why so much of it consists of repetitive DNA strands. It turns out that most of the genetic information encoded on the Y chromosome has to do with sperm production, although a few other functions and traits are encoded there as well. A little background is in order here: Most chromosomes in human cells are autosomes, that is, chromosomes that come in pairs. Of these pairs, one chromosome is passed down from the person's mother, the other from the person's father. This holds true for all non-sex chromosomes as well as the X chromosome. This pairing of chromosomes is useful because it allows the chromosomes to exchange some genetic information; a process that has the dual function of allowing them to recombine genetic material during the creation of egg and sperm cells (improving genetic variation within the species), and also allows a form of genetic repair in which bad genes on one chromosome are swapped out with a copy of good genes from its neighbour. Unfortunately for the Y chromosome, it has no such compatible neighbour. Its very tips match its X chromosome counterpart (male humans have a X chromosome as well as a Y, while female humans have dual X chromosomes), but any similarity ends there. The middle of the Y chromosome is like no other human chromosome, barring it from exchanging genetic material from other chromosomes.
This is why it was widely believed that the Y chromosome was useless, eroded and dying: It was widely held that there was no way it could repair any genetic damage, and that as the generations passed, the chromosome would degenerate until the point where even the SRY gene would be destroyed, wiping out the human male. However, nature turned out to be a clever engineer: The genetic makeup of the middle part of the Y chromosome turns out to be a gigantic tangle of genetic palindromes, allowing it to copy itself when bad genes are found. The characteristic shape of the Y chromosome, with the slight curve at its middle, is in fact a reflection of this; a gene on one side of the curve can copy parts from its twin the other side. The longest palindromic string of chemicals is 3 million bases long -- a bit more impressive a palindrome than "Otto". Since the Y chromosome does not ever copy any genetic material from other chromosomes, a man's Y chromosome is an exact copy of the one his father had, his grandfather before him, and so on for countless generations.
Unfortunately, while the Y chromosome's self-repair mechanism keeps it from deteriorating into the useless waste it was once believed to be, its nature also leaves it vulnerable to mutation, and indeed the most common reason for male infertility is deletions on a Y chromosome..... but obviously, such a flawed Y chromosome won't be passed on.
As an aside, there's no natural law that states that the XY combination must belong to a male within a given species, that's just how it is for mammals. Birds develop in a more or less completely opposite manner than mammals; their females have the XY combination and their males have XX. Reptiles don't have sex chromosomes at all, the sex of a reptile is determined by the temperature in its egg early in its fetal development.