Below is another part of the story you mentioned below.
After reading it I can safely say that the Buddha do NOT condone showing off any powers BUT if it is done for the greater good then yes. Just like what Buddha did to some of the monks who were chatting idly. Showing off is definitely wrong as we are supposed to be practicing humility and not abusing it. As for the nun who can levitate, I do not know her reasons for doing so and I believe that she have her own motivation for doing so. Maybe she did it to bring people in Buddhism in her area and show them that many years of meditation and practice, one can do so. Another way of showing people to have faith.
Moggallana's most developed faculties were not wisdom but psychic powers (iddhi). When, as a result of meditation, the mind is "concentrated, purified, cleansed, unblemished, free from impurities, malleable, workable and firm," it sometimes becomes capable of extraordinary abilities. Some of the psychic powers that Buddhist monks occasionally developed were the ability to change their appearance, being able to sense what was happening a great distance away, being able to read other people's minds and being able to leave the body.
The Buddha knew that the display of psychic powers could have quite an effect upon people, and not always a positive one. Those who displayed such powers could easily be spoiled by the adulation they received, while those who saw such powers displayed often gave unthinking devotion to those who had them. He was also critical of the use of psychic displays to convert people. Once, when the Buddha was staying at Nalanda, one of his disciples said to him: "Lord, Nalanda is rich, prosperous, crowded, full of people who have faith in you. It would be good if you were to get a monk to perform extraordinary feats and miracles. In this way Nalanda would come to have even more faith." The Buddha refused this request because he wanted people to follow the Dharma out of understanding, not because they had been impressed by miracles or psychic feats.
Once, a wealthy merchant put a sandalwood bowl on the top of a long bamboo pole which he set up in the market at Rajagaha. Then he let it be known that any monk who could rise into the air and remove the bowl could have it. Shortly afterwards, Moggallana and Pindola Bharadvaja went into Rajagaha, and when the merchant saw them he said, "You both have psychic powers. If you fetch the bowl, it is yours." So Pindola rose into the air and brought the bowl down, to the immense admiration of the large crowd who had gathered to watch. Then the merchant called Pindola to his house and filled the sandalwood bowl with expensive food. After that, everywhere Pindola went, crowds of noisy, excited people followed him. When the Buddha heard about this, he called Pindola and scolded him:
"It is not fitting, it is not becoming, it is not right, it is not worthy of a monk, it is not allowable, it should not be done. How could you, for the sake of a miserable wooden bowl, exhibit one of the conditions of a developed person to these householders. It is just like a loose woman who exhibits her undergarment for the sake of a few miserable coins."
As a result of this incident, the Buddha made a rule making it an offence for monks to unnecessarily display their psychic powers. However, he also realised that psychic powers could sometimes be put to good use. On another occasion, some thieves attacked a house and kidnapped two children. When the monk Pilindavaccha heard of this, he used his psychic powers to bring the children back. When the other monks accused him of breaking the rule, the Buddha declared him innocent of any offence because he had used his powers out of compassion."
Moggallana likewise usually used his psychic powers only to help people. Once when he was staying with the Buddha on the upper floor of the residence of Migaramata, a group of monks on the ground floor were chattering away and making a great noise. The Buddha described them as being "frivolous, empty-headed, agitated, with harsh and useless speech, lacking concentration, unsteady, not composed, with flighty minds and with senses uncontrolled" and he urged Moggallana to give them "a good stirring." So using his big toe Moggallana made the whole house, as large as it was, shake and tremble. Thinking that the house was about to collapse and shouting in fear, the monks ran outside. The Buddha then approached them and told them that at his request Moggallana had shaken the house by means of the psychic powers he had developed with diligent meditation and that they likewise should spend time meditating instead of indulging in idle chatter. But like the Buddha himself, Moggallana more usually helped people by teaching them the Dharma, and the Tipitaka preserves many of the discourses he delivered to monks and nuns, laymen and laywomen.