To be sure, Spock says nothing about beaming to a planet or a space station. He speaks exclusively of intraship beaming. And since he insists it is an issue, when beaming generally is not, it's logical to assume that it's an issue solely because it's intraship, i.e. for reasons unique to the intraship beaming situation.
So, what are our options there - in terms of Trek in general, since the episode itself doesn't offer many clues?
1) Beaming to or from a location a short distance away is dangerous, because the system gets inherently more accurate with distance (not completely unlike SARH missiles get more accurate with distance)? An unusual additional effort on accuracy would then be needed. But I think we have to call bullshit on that when the decrepit Klingon BoP effortlessly beams Kirk and Taylor aboard from something like two meters off the entry ramp.
2) Beaming through the strong walls of a starship is hell on targeting systems, and one has to guesstimate much better when the sensors just give weird echoes. This would work if the victim first travels from the pad to the hull via a cable and only then turns into a ghost that can waltz through walls. But how does one travel via cable if one isn't a ghost? Generally, when something goes wrong, the victim lingers at or near the pad (although most of those are dream sequences, to be sure).
3) It's generally not dangerous to materialize inside a wall, because the system automatically burps you out of there before you notice anything, but somehow this doesn't work inside a starship. This is the one issue Spock actually quotes, even if it's cut mid-sentence. But how would a starship be different from a surface palace or lair? And why isn't this an issue with alien starships, merely with the one the beaming is initiated on?
Timo Saloniemi