The perspective of a Jewish Marriage is to have children. However, is one allowed to have intercourse for pleasure?
The Sages say yes on Nedarim 20b.
Rabbi Johanan ben Dehavai advocates for a more ascetic approach to sexuality that is rejected by a different Rabbi Johanan in the name of the Sages, who assert that anything a man wants to do with his wife, he may do, equating this appetite to one for food, and acknowledging that people have different tastes. Rambam, and Tur endorse this approach.
It is of course noteworthy that The stringent opinion of Rabbi Johanan ben Dehavai is cited in Nedarim before it is rejected. In fact, the Rambam and the Tur both bring down the praiseworthiness of one who treats this act with reverence and does not indulge in it excessively, though they do not require it. It is likely that Rabbi Joseph Cairo in shmuel's answer is advocating for this approach rather than requiring it.
So there is room and weight given to both approaches, but Halacha is lenient.
Let's go back to our Bible. G-d says "it's not good for the human to be alone." So the very first source we have on marriage isn't about procreation, it's about emotional support.
Now the humans are told to "be fruitful and multiply", so procreation is important. Some rabbis have said that getting married per se is an obligation because it's the only legal way to procreate, but that doesn't mean that's the sole purpose of marriage! The Talmud makes it clear that if someone already had children and is now widowed or divorced, in theory his rabbi should step in and tell him "it's not good for the human to be alone", he should look to remarry. If having more kids is an option that's even better, as we value procreation, but that's not required. Clearly, procreation isn't everything.
The Bible also says that if one takes a second wife, he needs to ensure that he doesn't reduce the onah -- "physical and emotional attention" -- he's giving his first wife. Nothing about procreation. Similarly the Talmud says a husband is obligated to pay extra attention to the physical and emotional needs of his pregnant wife. Again, nothing to do with procreation.
Oddly, there were members of the Ger hassidic movement that would practice abstinence after they had "enough" children (where "enough", given the disease rate in Eastern Europe 150 years ago, was about ten); but that basically flies in the face of everything above.
So. An odd form of asceticism made its way into our tradition at some point, which said things like "you're not allowed to enjoy it, it can only be about your wife; or procreation; or just getting it over with, shame on you, so you can stay out of trouble and focus on something else. View it like paying the bills." But that's not the prevailing view you'd see in the Talmud; that's not how it's described in the Code of Jewish Law in the laws of marriage; that's not how the Aruch HaShulchan (early 1900s) describes it when he modifies the ascetic description (he writes it should "also" be intended for loftier purposes). It's not the advice you'll hear from virtually all centrist rabbis today. And quite frankly, it's not healthy.
More on the nitty-gritty here.
The מגיד תעלומות in his commentary to the Rif in Berachos 35a, partially quoting his father in law, says that really there should have been blessings on a number of pleasures, but for technical reasons they were not made. He gives the example of marital relations, which he says are not meant to be for pleasure but rather for the mitzvah, and therefore even when it is for pleasure it would be inappropriate to establish a blessing for it as that would imply condoning the involvement for the sake of pleasure.
Accordingly, involvement for pleasure is inappropriate to the point that they did not institute a blessing when they otherwise would have lest it lead people to think it is OK to be involved in relations for the sake of pleasure.
While hedonism is certainly forbidden from a Jewish perspective, strict asceticism is generally also considered against the current consensus, at the very least for the masses. The overall rule "kol maasecha yihyu l'shem shamayim" certainly applies, but that contextually doesn't preclude the pursuit of pleasure when that pursuit itself is in a Torah-based framework. More generally, both extremes are dangerous. See Rav Aharon Lichtenstein who discusses the sources and historical perspectives on this issue.
translation from davka,feldheim
This /consideration applies/ also to the marital relations that are required of one by Torah law. To perform them /in order/ to satisfy one’s desires or bodily enjoyment is disgraceful and even if one’s objective is in order to have sons that will serve him and replace him it is /also/ not commendable. One should rather have in mind to have sons to serve his Creator or /act/ like a person who is paying his debt, to fulfill the mitzvah of /giving his wife her/ conjugal rights.
שולחן ערוך אורח חיים סימן רלא
שכל כוונותיו יהיו לשם שמים ובו סעיף אחד:
סעיף א אם אי אפשר לו ללמוד בלא שינת צהריים – יישן. הגה: וכשניעור משנתו, אין צריך לברך "אלהי נשמה" (בית יוסף). ויש אומרים שיקרא קודם שיישן "ויהי נועם" (כל בו). ובלבד שלא יאריך בה, שאסור לישן ביום יותר משינת הסוס, שהוא שיתין נשמי. ואף בזה המעט – לא תהא כוונתו להנאת גופו, אלא להחזיק גופו לעבודת השם יתברך. וכן בכל מה שיהנה בעולם הזה, לא יכוון להנאתו אלא לעבודת הבורא יתברך, כדכתיב: "בכל דרכיך דעהו" (משלי ג ו), ואמרו חכמים: כל מעשיך יהיו לשם שמיים, שאפילו דברים של רשות, כגון האכילה והשתיה וההליכה והישיבה והקימה והתשמיש והשיחה וכל צרכי גופך, יהיו כולם לעבודת בוראך, או לדבר הגורם עבודתו. שאפילו היה צמא ורעב, אם אכל ושתה להנאתו – אינו משובח, אלא יתכוין שיאכל וישתה כפי חיותו לעבוד את בוראו. וכן אפילו לישב בסוד ישרים ולעמוד במקום צדיקים ולילך בעצת תמימים, אם עשה להנאת עצמו – להשלים חפצו ותאותו – אינו משובח, אלא אם כן עשה לשם שמיים. וכן בשכיבה, אין צריך לומר שבזמן שיכול לעסוק בתורה ובמצוות לא יתגרה בשינה לענג עצמו, אלא אפילו בזמן שהוא יגע וצריך לישן כדי לנוח מיגיעתו – אם עשה להנאת גופו אינו משובח; אלא יתכוין לתת שינה לעיניו ולגופו מנוחה לצורך הבריאות, שלא תיטרף דעתו בתורה מחמת מניעת השינה. וכן בתשמיש האמורה בתורה, אם עשה להשלים תאוותו או להנאת גופו – הרי זה מגונה. ואפילו אם נתכוין כדי שיהיו לו בנים שישמשו אותו וימלאו מקומו – אינו משובח, אלא יתכוין שיהיו לו בנים לעבודת בוראו, או שתהיה כוונתו לעבודת הבורא או לדבר המביא לעבודתו. כללו של דבר: חייב אדם לשום עיניו וליבו על דרכיו ולשקול כל מעשיו במאזני שכלו, וכשרואה דבר שיביא לידי עבודת הבורא יתברך – יעשהו, ואם לאו – לא יעשהו. ומי שנוהג כן, עובד את בוראו תמיד.
231: THAT ALL ONE’S INTENTIONS SHOULD BE FOR THE SAKE OF HEAVEN
1 If one cannot learn /Torah/ unless he sleeps at noon he should /indeed/ sleep /then/. Gloss: When one awakes from his sleep he does not need to make the blessing Elokay Neshamah. (…)There are /authorities/ who say that before one sleeps he should read /the psalm/ Vi-yhi No’am. /Sleeping in the daytime is permitted only / provided one does not prolong it, since it is forbidden to sleep during the day (4) more than a “horse’s sleep,” which is sixty breaths. Even this brief /sleep/ should not be for the purpose of one’s bodily pleasure, but /in order/ to maintain one’s body for the service of Ha-Sheym, may He be Blessed. Likewise, in the case of all /other/ benefits from this world, one should not have his /own/ enjoyment in mind, but the service of the Creator, may He be Blessed, as it is written: 2* “In all your paths be conscious of Him.” Our Sages said that all one’s actions should be for the sake of Heaven. Even non-mitzvah matters, such as eating, drinking, walking, sitting, standing, marital relations, conversation and /the satisfaction of/ all one’s bodily requirements, should all be /done/ for the service of one’s Creator or as a medium that will contribute towards His service. /This means/ that even if one is thirsty or hungry and eats or drinks for his enjoyment this is not commendable, but he should have in mind to eat and drink what is /necessary/ for his survival /so as to be able/ to serve his Creator. Likewise, even to sit in the confidence of the just, stand in the presence of the righteous or walk in the counsel of the perfect is /also/ not commendable, if one does it for his own advantage, to satisfy a wish or a desire. It is only /praiseworthy/ if done for the sake of Heaven. Similarly, where sleeping is concerned, it goes without saying that when one is able to engage in Torah /study/ and /the fulfillment of/ mitzvos /without it/ he should not indulge in sleep /merely/ for his personal pleasure, but even if one is weary and needs to sleep in order to recover from his fatigue it is not commendable if he does it for his bodily enjoyment. He should rather have in mind to give sleep to his eyes and rest to his body for the sake of his health, so that when /he learns/ Torah his mind will not be confused as a result of lack of sleep. This /consideration applies/ also to the marital relations that are required of one by Torah law. To perform them /in order/ to satisfy one’s desires or bodily enjoyment is disgraceful and even if one’s objective is in order to have sons that will serve him and replace him it is /also/ not commendable. One should rather have in mind to have sons to serve his Creator or /act/ like a person who is paying his debt, to fulfill the mitzvah of /giving his wife her/ conjugal rights. In the same way, regarding conversation, even if one relates words of wisdom, his aim /in doing so/ should be the service of the Creator or /it should be/ for a purpose that will lead to His service. The general rule is that one is obliged to examine and be conscious of his ways and weigh all his actions with the scales of his intelligence. If he sees that something leads to the service of the Creator, may He be Blessed, he should do it, but if not he should not do it. Whoever acts in this way serves his Creator perpetually.