One cannot help but notice that TOS seems to have a distinct hostility toward computers and advanced machines. They are NEVER shown to be useful and are usually depicted as a threat to human life. This stands in stark contrast to all of the later series who had a much more favorable approach to technology.
Most intelligent machines were depicted as malevolent or at the veryleast a malevolent influence
Nomad
M5
The Doomsday Machine
Landru
Vaal
Even Kirk's personal computer was, with its female personality, was depicted as an annoyance. This of course does not include the various androids (which are quietly forgotten in on TNG in order to make Data special).
Why do you think that the show seemd so hostile toward machines? was it simply a lack of familiarity with the technology? (i.e. by the time of TNG people were familiar with computers and thus less afraid of them).
In that it really is a product of its time in that the supposed 'replacement' of man by machines (ie that automated and intelligent machines would take over the majority of jobs done by man) was an issue on the minds of many as automation and computer technology advanced. So, it's not surprising that the theme showed up in a lot of stories (and not only in Star Trek - take a look at The Twilight Zone too.)