he shouldn't have been there from the start, but Angel season 4 needed him, & Buffy season 7 didn't need him much,
I won't say that Season 7 revolved entirely around Spike, but he was undoubtedly an integral part of the main story line. AS you say, Season 4 of "Angel" could have been rewritten to include Spike, but in so doing, Season 7 of "Buffy" would have had to be rewritten almost completely to work right without him. By Buffy's own admission, he was the one who gave her the strength and determination to carry on with her mission after the gang threw her out, and her dependence on him didn't begin just with "Empty Places" and "Touched."
And as much as Buffy needed Spike in that season, he needed her as much if not more. The main reason, I believe, in how quickly Spike came to terms with his new found soul was Buffy's belief in and support of him, the assurance that what he had done was right and, because of it, he could actually become a better man, as opposed to the rejection and condemnation that Angel got from the person who meant the most to him at that time, Darla. There was no one on Angel's show who could have given him that, and without his soul and the changes that it made in him, he would have never been able to be accepted by anyone there, As it was, the only thing that allowed him to become accepted into that group was the fact that, incorporeal as he was, and attached to the Wolfram & Hart building, they had no choice but to get to know the new version of who he was. Without that time, he would have either been staked or at the very least not been trusted by them, which would have made him useless there.
Granted, those, and all of the other elements that Spike contributed to Season 7 or COULD HAVE contributed to Season 4 could have been written in a way as to do without or include his character, but I honestly believe that those changes would have been so great that they would have taken far too much away from Season 7 and contributed far too little to Season 4 to make those changes necessary.
But above and beyond all of that, Buffy needed to learn about Spike's soul first hand, and Spike needed to hear Buffy tell him, however you choose to interpret her meaning, that she actually did love him. If for nothing but those two scenes, Spike HAD to be in Sunnydale for that last season.