Why lord Shiva was unable to defeat Jalandhara? And also is there any story that describes why did Vrinda marry a demon?
The Story of Jalandhara is described in Rudra Samhita (Yuddha Khanda) (chapter 13 - Chapter 25) of Shiva Mahapurana and Uttarakhada (Chapter 3 - Chapter 18) of Padma Purana. Story of Jalandhara is same in both Puranas with slight variations.
Why lord Shiva was unable to defeat Jalandhara?
Jalandhara was born from third eye of Shiva when Indra confronted Shiva with arrogance and baby born out of Shiva's third eye was given to Ocean God. Brahma predicted that Jalandhara could only be killed by Shiva as he had amsa of Shiva.
श्रृणु सागर ! वक्ष्यामि तवास्य तनयस्य हि।
जातकोतफल सर्व समाधानरत: खलु। २३।
Brahma said, "O Ocean, I shall narrate the future as revealed by his horoscope completely. Listen to me attentively.
नेत्राभ्यां विघृतं यस्मादनेनैव जल मम।
तस्माञ्जलन्धरेतीह ख्यातो नाम्ना भवत्वसौ।। २४ ।।
अधुनैवैष तरुणः सर्वशास्त्रार्थपारग:।
महापराक्रमो धीरो योद्धा च रणदुर्मदः।। २५ ।।
भविष्यति च गम्भीरस्त्वं यथा समरे गुहः।
सर्वजेता च सङ्ग्रामे सर्वसम्पद्विराजितः॥२६॥
दैत्यानामधियो बालः सर्वेषा च भविष्यति।
विष्णोरपि भवेञ्जेता न कुतश्चित्पराभवः॥२७॥
Since he made the tears to flow from my eyes, he will be known by the name of Jalandhara. He would become youthful just now and attain mastery over all the lores. He would be extremely valorous, courageous, heroic, invincible and majestic like you. He would win all the battles like Kartikeya and he would shine with all sorts of prosperity. He would become the emperor of the demons and will conquer even Vishnu. No one would be able to defeat him.
अवध्यः सर्वभूतानां विना रुद्रं भविष्यति।
यत एष समुद्भूतस्तत्रेदानीं गमिष्यति॥ २८॥
He can be slain by none else except Siva himself. He will return to the place from which he sprang up.
So, it is clear that Jalandhara could be defeated by Shiva. But chastity of his wife Vrinda made Jalandhara stronger.
But Parvathi asked Vishnu only to destroy chastity of Jalandhara after he came to Parvati in disguise as Shiva.
यावद्ददर्श चार्वङ्गीं पार्वतीं दनुजेश्वरः।
तावत्स वीर्यं मुमुचे जडाङ्गश्चाभवत्तदा॥४१॥
On looking at the beautiful Parvati, by the lord of Daityas, his semen fell on the ground and all his limbs became benumbed
अथ ज्ञात्वा तदा गौरी दानव भयविह्वला।
जगामान्तहिंता वेगात्सा तदोत्तरमानसम्॥४२॥
Thereafter, when Gauri came to realise, the truth that he was a Daitya and not Siva, she disappeared from the site and went to northern shore of the lake Manasa.
पार्वत्यपि महाविष्णु सस्मार मनसा तदा।
तावद्ददर्श तं देवं सोपविष्टं समीपगम्॥ ४४॥
Then Parvati remembered lord Vishnu mentally and she found at once that the lord was seated before her.
Parvathi then told her brother Vishnu to destroy Jalandhara wife's chastity.
तच्छुत्वा विष्णुवचनं पुनरप्याह पार्वती।
हृषीकेशं जगन्माता धर्मनीर्तिं सुशिक्षयन्॥४९॥
तेनैव दर्शितः पन्था बुध्यस्व त्वं तथैव हि।
तत्स्त्रीपातिव्रतं धर्मं भ्रष्टं कुरु मदाज्ञया॥ ५० ॥
Sanatkumara said, “On hearing the words of Vishnu, Parvati, the mother of the universe, then desired to teach the policy based on dharma.' Parvati said, “He himself has shown the path, now that has to be the way and he should be paid in the same manner. At my command, destroy the chastity of his wife.
नान्यथा स महादैत्यो भवेद्वध्यो रमेश्वर ! पातिव्रतसमो नान्यो धर्मोऽस्ति पृथिवीतले॥ ५१॥
O Vishnu, "the Daitya cannot be killed otherwise. There is no other virtue comparable to chastity in the world.”
So, chastity of Vrinda made him stronger.
And also is there any story that describe why did Vrinda marry a demon?
There's no particular story why Vrnda married Jalandhara. Vranda was Asura Kalamaneni's daughter. Ocean God married Jalandhara to Vrnda.
Padma Purana mentions turning of vrnda to Tulasi after giving up her body but Shiva Purana doesn't mention it.
42b-46. God Vishnu looked upon the pleasure due to the fascination of Vrnda as superior to (that derived from) salvation, and as giving greater delight than derived from Lakshmi. Then Madhava, Krishna who was the royal swan in the well charming and shining due to her sports, lost (all) his longing for Lakshmi due to the beauty of Vrnda. In that forest, Vrnda turned into the form of Tulasi. That (Tulasi) that was highly purifying arose from the sweat of Vrnda. Having, for some days, enjoyed the pleasure due to the contact with Vrnda's body, (Vishnu) the lord of the world, thought about the mission of Siva.
Previous birth of Vrinda is not mentioned in Shiva Purana and Padma Purana. But, Prakriti Khanda (Chapter 15-21) of Brahma Vaivartara Purana and Shankachuda episode of Shiva Purana mentions different story of Tulasi. This difference could be due to Kalpa Bheda.
Padma Purana mentions mainly events of Padma Kalpa. So, in Padma Kalpa Vrnda turned into Tulasi. Shiva Purana mentions mainly events of Sevta Kalpa and Brahma Vaivarta Purana mentions mainly events of Rathnantara Kalpa. So, in Sveta and Rathnanatara Kalpa Tulasi was born due to curse of Radharani.
The previous birth of Tulasi is mentioned in Prakriti Khanda (Chapter 15-21) of Brahma Vaivartara Purana and Chapter 27 and 28 of Rudra Samhita (Yuddha Khanda) Shiva Maha Purana.
Tulasi was cowherdess in Goloka, the region of Lord Krishna. Tulasi was cursed by Radhika, consort of Lord Krishna, to get born on Earth. Sudama, who had amsa of Krishna, was also born on Earth as Samkhachuda. Tulasi married Shamkachuda.
अहं च तुलसी गोपी गोलोकेऽहं स्थिता पुरा।
कृष्णप्रियाकिकरी च तदंशा तत्सखी प्रिया। २४।।
In the earlier times I was a cowherdesses named Tulasi and was the beloved of lord Krishna. I was his beloved as well as his servant.
गोविन्देन सहाऽऽसक्तामतृप्तां मां च मुच्छिताम्।
रासेश्वरी समागत्य चापश्यद्रासमण्डले।२५।।
गोविन्दं भत्सयामास मां शशाप रुषाऽन्विता।
याहि त्वं मानवीं योनिमित्येव च पितामह। २६।।
Once when I was dancing with lord Govinda, I became passionate and before getting satisfaction I fainted. At that point of time Radha the great goddess arrived there and she saw everything. Getting annoyed she denounced the lord Govinda and pronounced a curse on me to be born in a human family.
मामुवाच स गोविन्दो मदंशं त्वं चतुर्भुजम्।
लभिष्यसि तपस्तप्त्वा भारते ब्रह्मणो वरात्।। २७।।
O grandfather, at that point of time lord Govinda told me that by performing tapas in Bharata I would achieve a boon from Brahma in order to seek four-armed Vishnu as my husband.
इत्येवमुक्त्वा देवेशेऽप्यन्तर्धानमवाप सः।
देव्या भिया तनु त्यक्त्वा लढ्धं जन्म मया भुवि॥२८॥
Thus speaking, the lord disappeared and terrified from of goddess Radhika my life came to an end. I have been reborn on the earth.
अहं नारायणं कान्तं शान्तं सुन्दरविग्रहम्।
सांप्रतं लब्धुमिच्छमि वरमेवं च दहि मे। २९॥
I am desirous of getting lord Narayana as my husband who is peaceful and has a beautiful body. You kindly grant me this boon.”
सुदामा नाम गोपश्च श्रीकृष्णाङ्गसमुद्भवः।
तदंशश्चातितेजस्वी चालभज्जन्म भारते॥ ३० ।।
Brahmā said-A cowherd named Sudāmā who was born of the ray of lord Krishna has been born on earth. He happens to be quite illustrious.
शङ्खचूड इति ख्यातस्त्रैलोक्ये न च तत्समम्॥ ३१॥
Now, by the curse of Radhika, he is born in the race of demons by the name of Sahkhachuda, No one can equal him in the world.
गोलोके त्वां पुरा दृष्ट्रा कामोन्मथितमानसः।
विलम्बितुं मा शशाक राधिकायाः प्रभावतः।। ३२॥
He became passionate in the Goloka while looking at you but he could not transgress the rules because of the influence of Radhika.
स च जातिस्मरस्तप्त्वा त्वां ललाभ वरेण च।
जातिस्मरा तु त्वमपि सर्व जानासि सुन्दरि।। ३३।।
O beautiful one, he is well aware of the happenings of the earlier birth. Therefore by performing tapas he has already got you as a boon. Because of your belonging to the same base you also know him.