This is to show that the power of faith works. Because the physical which becomes what you use to impress the subconscious mind. If you keep believing like the lady said. You open the possibility to get healed. Because your sending the conviction to the subconscious mind.
For sure the Gracious One is a Perfect Sambuddha, who teaches the Dhamma for the giving up of suffering such as this; for sure the Gracious One’s Community of disciples are good in their practice, who practice for the giving up of suffering such as this; it is sure that Emancipation is truly happy, where suffering such as this is not found.
Buddha acts then like the Middle Path of the conscious and subconscious to send back the believe to the conscious mind. The healer.
While the lady was at home Buddha said this word to her man,
Happy may the Koliyan lady Suppavāsā be, and healthy, and may she give birth to a healthy son.” And with this word of the Gracious One, the Koliyan lady Suppavāsā became happy and healthy, and gave birth to a healthy son.
When the man went home she was already happy and healthy, and gave birth to a healthy son.
Surely it is wonderful, surely it is marvellous, the Realised One’s great power and great majesty, in as much as this Koliyan lady Suppavāsā, with this word of the Gracious One, became happy and healthy, and to a healthy son gave birth”, and he was elated, gladdened, joyful and happy.
This sutta is truly a lesson that Faith is all in your hand.
That’s why later in the sutta.
If, reverend Sir, master Mahāmoggallāna is my surety for three things—for wealth, for life, and for faith—the Koliyan lady Suppavāsā may make her seven meals, and afterwards I will make mine.”
For two things, friend, I am your surety—for wealth and for life—but for faith you are the surety.”
https://suttacentral.net/ud2.8/en/anandajoti
Like is said in modern times. You are the magic