How did the red blood cell in humans get to lose its nucleus (and other organelles)? Does the bone marrow just not put the nucleus in, or is it stripped out at some stage in the construction of the cell?
Red blood cells are initially produced in the bone marrow with a nucleus. They then undergo a process known as enucleation in which their nucleus is removed. Enucleation occurs roughly when the cell has reached maturity. According to one research (Ji, et al., 2008), the way this occurs in mice is that a ring of actin filaments surrounds the cell, and then contracts. This cuts off a segment of the cell containing the nucleus, which is then swallowed by a macrophage. Enucleation in humans most likely follows a very similar mechanism.
The absence of a nucleus is an adaptation of the red blood cell for its role. It allows the red blood cell to contain more hemoglobin and, therefore, carry more oxygen molecules. It also allows the cell to have its distinctive bi-concave shape which aids diffusion. This shape would not be possible if the cell had a nucleus in the way. Because of the advantages it gives, it is easy to see why evolution would cause this to occur. However, since little is known about the genes the control enucleation, it is still not a fully understood process.
Shown to be in mice & rats (and sick humans), the cell-cell interaction between a macrophage (this is a big engulfing cell required for immunity) and young red blood cells (RBC), is known as the erythroblastic island (commonly known as EBI). If you googled it, there is a scientific review in 2008 that describes this structure.
At the embryonic stage (in humans), we still retain our RBC nuclei. But as we developed into fetus and adult, we no longer have RBC nuclei. This is thought to be related to the EBI present (in the fetal liver and adult bone marrow respectively). Currently, there is a lack of information of the EBI in other mammals. The only proven ones are mice, rats and sick humans. It is widely assumed (not proven) that mammals have EBIs. Besides mammals, some other animals (e.g. birds) have enucleated RBC, and some don't. It is unclear why is it so. Our lab thinks that it might be related to the formation of the EBI.
In addition to engulfing the RBC nuclei, it is believed that the macrophage acts as a "nurse" cell as proposed in the 50s. In other words, possibly providing iron, and possibly providing some proteins required for young RBC to mature. In early 2013, for the first time, it was showed that these macrophages are important in animal models (published by 2 research groups in nature medicine journal).
As for enucleation (the removal of erythroid nuclei), the exact mechanisms are unknown. But cytoskeleton proteins are important players in enucleation. However, there isn't enough information, as these proteins are essential for other important cellular activities as well. For example, bringing in nutrients, development and cellular migration. Most animal models that lack these proteins are unavailable for studies, and these animals usually die at the embryonic stage.
The research mentioned by EdoDodo is a proposed model on how enucleation takes place, and is a widely accepted model. Currently, our lab are working on another model that could partially explain how enucleation is being triggered.
Advantages of enucleation
In addition to better oxygen diffusion across the membranes, some older scientific papers mentioned that it lightened the cardiac workload. Each extruded RBC nuclei is approximately 40 picograms. A normal healthy adult individual would produce about 2 million RBC per second. That would be 0.08 milligrams of weight per second are required to be removed. However, I couldn't trace the scientific evidence for this claim, but this have been cited by some scientific papers.
The other advantage would be to reduce risk of hemolysis when transversing through the microvasculature. In other words, mature RBC can move along tiny blood capillaries by changing their biconcave shape (to bell-shaped I think), so that they will not rupture (and die).
Also, not all RBCs have similar shapes and sizes. You might want to google it for more information. I think camels have slightly different RBC morphology.
The only function of the red blood cell is to transport oxygen, and nothing else. Its concave shape is to increase its surface area, so more oxygen can be transported per cell. The absence of a nucleus means it can be significantly more concave than an other cell of analogous size, meaning it can carry more oxygen.
Other answers are more detailed, but this is the main reason that there is an absence of a nucleus.