The primary purpose of spaceplanes is fun and challenge.
While you can theoretically operate them on cost of fuel alone (providing you don't crash), if you take profits "per hour of gameplay" from completing contracts with unrecoverable or partially recoverable launchers to profits you can achieve in the same (real) time with spaceplanes, the balance goes way towards rockets - you can finish three contracts earning 70% value from each in the time it takes you to complete one contract earning 98% of its value with a spaceplane.
This goes even worse for the two sandbox modes where money is non-issue.
The value of spaceplanes lies in the difficulty curve of building and flying them. Rockets are easy. After a while you'll want to install MechJeb simply to avoid the tedium of launch process. Meanwhile, spaceplanes are challenging.
Sure, the "official" goal of them is completing contracts. Tourists, satellites, maybe site surveys after a suborbital fight. But it takes skill and patience to build a spaceplane that handles well on climb, reaches orbit reliably and in non-excessive time, can carry a non-token payload, handles well on reentry and landing, looks nice and maybe even doesn't cost a fortune.
[I've purposely listed handling on climb, reentry and landing separately... I might add early and late climb. These are all flight phases where different traits of the plane are important - e.g. on late climb you can't count on air to stabilize you if your thrust is off-center; on reentry your Center of Mass will have shifted after burning the rocket fuel. On landing you must fly slowly and control your descent rate actively...]
In short, spaceplanes only marginally fit into the "big picture". You can visit all the planets, complete the science tree and win many challenges without ever visiting the SPH or upgrading it. But they are a game of their own, a separate challenge, something fun to do next to all that standard work.
Plus there's few things in the game looking more impressive than a mighty, big spaceplane docked to a space station.