I would like to know if there is a resource, preferably a book, that gives the reason/intention of specific mitzvot. My question stems from a shiur i heard from rabbi akiva tatz. Where he said something along the lines of when you visit a person who is sick you shouldn't just be visiting because it is a mitzvah, i don't remember if that was the end of the point or not, but he seemed to also imply/say that you should be visiting for another reason. Also if you know this "other reason" let me know.
There are a large number of Jewish books that discuss the topic of reasons and intentions for Mitzvos. A Google search will find a number of titles that are appropriate, but I will detail two in particular that are pretty much devoted to this topic.
1) Sefer Hachinuch - the "Classic" work on this topic
2) Horeb - A more recent work, by Rav Hirsch
(Also, in regards to your original question about Bikur Cholim, see https://he.wikipedia.org/wiki/ביקור_חולים, which discusses why one should visit the sick.)
As noted by @רבותמחשבות a classical work on the reasons for mitsvot is the Sefer HaHinnukh which goes through all of the mitsvot, and provides descriptions of the mitsvot, and their reasons.
Another classical source, is Rambam's Moreh Nevokhim which spends much of the third section (ch. 25-40) discussing the reasons for different mitsvot.
Regarding visiting the sick in particular, Rambam writes (Shoresh 2 to Sefer HaMitsvot) that it is just a subset of the normal mitsvah to love one's fellow as oneself.
In fact, one objective of many mitsvot, is that we should develop into kind and caring people, not cruel and insensitive people. (See Sefer HaHinnukh 294, 244, 452).
R. Sh'lomo Ibn Gabirol writes in the introduction of his Tikkun Middot HaNefesh that akhzariut (cruelty or callousness) is the worst character trait. And Jewish literature is replete with references to the evils of callousness and the greatness of kindness and caring. For just one example, note Rabbenu Yonah in Sha'arei Teshuva (3:36) who writes that the point of Deuteronomy (15:7) which enjoins us to help the poor and not "harden our hearts", is that besides for just helping the poor, the act should specifically come from compassion.
Similarly, the opinion of some that mitsvot tsrikhot kavana; fulfillment of the mitsvot depends on intent, likely doesn't apply to interpersonal mitsvot. For example, R. Ya'akov Ariel (cited here) writes:
אלא על כרחך במצוות שבין אדם לחבירו ניתן לצאת ידי חובה גם בלא כוונה. וזאת משום שעיקר מטרתן היא לא עצם המעשה אלא התוצאות שיש מהן לזולת
Rather it is clear that it is possible to fulfill interpersonal mitsvot without intent. And this is because [unlike ritual mitsvot] their main purpose is not the act itself, but the result of that act to others.
Similarly, the Seridei Esh (I:61 cited there) writes that in the case of charity, giving out of compassion or love is superior to giving due to a technical obligation:
וכן הדין בצדקה, שאם הוא נותן מתוך רחמנות או מתוך אהבת ישראל טוב יותר ממי שנותן מתוך צווי וכפיה
It seems obvious that this was R. Tatz's point; that one should not be so callous as to ignore a person's plight, and only be moved to activity by some technical mitsva. Rather, one should be motivated by care and compassion.
See the above link for other sources for this idea from Rambam and others.