First, allow me to provide the link to an old paper that deals with development in *Ananas comosus*, it should be freely available and answer this question in more detail: <http://onlinelibrary.wiley.com/doi/10.1111/j.1469-8137.1936.tb06884.x/pdf>

Now, to briefly explain the observation that a mature plant will grow from the region where the leaves of the pineapple attach to the fruit, it should be noted that the pineapple fruit develops at the top of the central stem of the plant in a developmental process known as influorescence (please see a picture of a pineapple plant). Since the top portion of the fruit is in fact the end of the primary stem, this region contains the apical meristem, a collection of stem cells that are apparently is sufficient to give rise to a mature organism. Pineapple development has apparently been a topic of constant research for nearly a century (due to its economic importance), so there are quite a number of papers that can provide much more detail, but many of these are not freely available.

In nature the primary means of pineapple propagation is the formations of lateral shoots, the growth of which consequently are accelerated by influoresence of the main shoot.