Is the prohibition of swimming during the nine days because of an increased danger during the nine days or is it because of the fact that you cant bathe for pleasure during the nine days? Or is it a combination of both factors?
It seems that both reasons are applicable.
See Rama in Shulchan Aruch 551:16 which says that bathing for pleasure is prohibited.
See Shulchan Aruch 551:1 and 551:18 which says that when the month of av comes in the more one should be careful and then says later on that certain parts of the day are more dangerous(see Mishna Brurah on 551:18).
The Medrash Eicha Rabbah 1:29 explains that from the 17th of Tammuz to the 9th of Av it is a dangerous time.
Rav Shlomo Zalman Aurbach in Shalmei Moed chapter 90 says that one should avoid dangerous activities.