Why are babies given a stimulant like theophylline?

Respiratory stimulnt. Theophylline is a first cousin of caffeine.About 3 decades ago was found to stimulate respiratory centers in premature infants who occasionally forgot to breathe (apnea) & it or caffeine are both still used for this purpose.
Was it theophylline? Theophylline is rarely used now, even in asthmatics. Could you mean caffeine, which helps premies with apneic episodes. It does stimulate their nervous systems to keep heart rate and breathing regulated.