Therefore it feels wrong when we follow those characters for seven years or so and suddenly one of them are killed off for no acceptable reason at all.
Sigh....

"For no acceptable reason"...
According to whose standards??
Although (and heaven help me!), I do agree with you that there was no real reason for Data to be killed off the way he was, especially in light of
Nemesis being all but certain to be the last
TNG film. Maybe someone here can enlighten me:
was it certain at the time that there probably wouldn't be another film after
Nemesis? If there
was some possibility of another movie, I can see them going the way they did - at least, much more than if not.
And when it comes to Data, there was a possibility left at the end of the movie that Data could return so why don't use that option?
I assume you meant "why don't
the books use that option." If so, this has been covered in various threads in this forum, but as I understand it, it's felt that Data's sacrifice,
within the bounds of the story, was meaningful...and that there's no compelling dramatic reason to cheapen his sacrifice with a
deus ex machina resurrection. Apologies if I'm mistaken, and hopefully one of the writers hereabouts will correct me if I'm wrong.
As for Spock's death, they killed him off because Nimoy wanted to quit. But fortunately they did realize that Star Trek without Spock would never be the same so they persuaded Nimoy to come back and Spock did resurrect. Fortunately, it looks like Nimoy haven't had any objections to return as Spock in some movies and episodes. We should be grateful for that.
That's not
exactly true. When Harve Bennett was developing
Star Trek II, he approached Nimoy about participating, but Nimoy was reluctant because he wasn't sure what else could be done with Spock, and because he hadn't enjoyed making
The Motion Picture. When Bennett broached the idea of Spock dying, it intrigued Nimoy because of the dramatic possibilities inherent in Spock's death--dying, after all, was something Spock hadn't done before. (I doubt this is going to gel for you,
Lynx--and I really don't mean anything bad by saying that--but it does relate to your issues with character deaths and the reasons for them, as Nimoy saw some interesting story potential in the death of Spock.) See, "they" didn't kill Spock off because Nimoy wanted to quit - it was a
story idea that kept Nimoy interested.
So the script was written, and re-written, and Spock's death, originally intended for the first act, became instead the denouement of the picture. During the course of making the film, Leonard Nimoy discovered that he was enjoying playing Spock again, and improvised the "Remember" moment as a "back-door" in case they wanted to pick up a story thread later on. After the movie came out, Nimoy was approached about continuing his association with
Star Trek--not necessarily as an actor--and negotiated a return as director of the third movie (and then the fourth). In this capacity, he had much more say over what direction the Spock character took, and was able to avoid the problem he'd had before - that of Spock stagnating.
So it wasn't a case where, as you put it, "they [the filmmakers, I assume] did realize that Star Trek without Spock would never be the same so they persuaded Nimoy to come back and Spock did resurrect." Indeed, if you look at the development of
Star Trek II and the addition of characters like David Marcus and Saavik, the studio was fully prepared to go on without Spock if necessary, and as
Christopher has pointed out, these replacement characters were only abandoned, their potential largely unrealised, when Nimoy did eventually return. In fact, the only significant "persuasion" that went in with regard to Nimoy remaining with
Star Trek
was the other way around, when Nimoy had to persuade Michael Eisner (then in charge of Paramount) that he did not hate Spock and would be a good choice to direct
Star Trek III.
Fortunately, it looks like Nimoy haven't had any objections to return as Spock in some movies and episodes. We should be grateful for that.
On this we agree (although I could have almost done without "Unification," as I don't think it used Spock's character particularly well).