Brahma knew asuras would cause trouble all around the universe and that's the reason why he puts a condition for their end. Asuras perform tremendous penance and austerities which cannot go unrewarded. They must receive the fruit of their work(Karma). That's why Brahma obliged to give whatever they want. But only for a limited period of time. Because unlimited power in the wrong hands for eternity would be chaotic. For beings who are righteous, Brahma could grant them even Immortality. As seen In Vibhishana’s case.
We can also see in Treta yuga,.when a Yaksha asked for a child from Brahma, he blessed him with a daughter, ie, Tataka, deeming a male to be far more destructive and violent than a female.
Once there was a formidable yaksha named Suketu, but he was childless, and he who had devout conduct performed a great ascesis. Gladdening at his ascesis, Rama, then the Forefather Brahma gave him a gemlike daughter who is renowned by the name of Tataka.
"Forefather Brahma also gave the strength of a thousand elephants to her, but he that highly remarkable Brahma did not give a son to that yaksha, anticipating male to be more hazardous. When that bright girl is growing up into a youthful beauty her father Suketu gave her to Jambha's son Sunda as wife.
In sat yuga, 2 asuras named Sunda and Upasunda asked Brahma for absolute power as well as Immortality. Brahma granted everything to them except for Immortality, claiming the sole purpose for their penance was to cause trouble to the universe, and set a condition for their death. So that they may dominate and torment others as long as the merit of their austerities lasted.
Then the brothers Sunda and Upasunda, both of great prowess, beholding the Grandsire, rose from their seats and waited with joined palms. And the brothers both said unto the God, 'O Grandsire, if thou hast been pleased with these our ascetic austerities, and art, O lord, propitious unto us, then let us have knowledge of all weapons and of all powers of illusion. Let us be endued with great strength, and let us be able to assume any form at will. And last of all, let us also be immortal.'
Hearing these words of theirs, Brahman said, 'Except the immortality you ask for, you shall be given all that you desire. Solicit you some form of death by which you may still be equal unto the immortals. And since you have undergone these severe ascetic austerities from desire of sovereignty alone I cannot confer on you the boon of immortality. You have performed your ascetic penances even for the subjugation of the three worlds. It is for this, O mighty Daityas, that I cannot grant you what you desire.'
Brahma cannot refuse their request outright. The asuras have undergone intense penance, subjecting themselves to self-inflicted torture, and must be rewarded, even if it means causing harm to others. However, this power is only granted for a limited time after which they are killed according to the given condition.
Had these asuras used their power for good, they could've ruled the universe for eternity irrespective of their condition for death. It is their deeds which brought their destruction.
When Hanuman saw Ravana, he believed that with his powers gained through austerities, Ravana could have been the protector of the universe including the gods, had he used them for righteousness.
Dazzled by his magnificence on seeing Råvana shining brightly, Hanumån thought in his mind as follows: (16)
What charm, what presence of mind, what courage, what splendour and what combination of all auspicious bodily marks are present in the king of ogres ! (17)
Had this mighty lord of ogres not been antagonistic to virtue, he would have proved to be a protector of the realm of gods including Indra, the ruler of gods. (18)
Due to his cruel and ruthless deeds, condemned by the world, all people including gods and demons remain actually afraid of him.
If enraged, he can really turn the world into one ocean.í Perceiving the glory of Råvana (the king of ogres), who was endowed with extraordinary might, the sagacious Hanumån brooded on such diverse thoughts.