The home town drug stores that housed the majority of the soda fountains were also being bought by major chains who wanted to use the space devoted to soda fountains for other items such as cosmetics and nylons. The home town drug stores that were not bought up, started following the example of the national chains. Another major reason for the decline in soda fountains was television. Many of the soda fountains that made it through the late 50's survived on the patronage of kids, but could not survive through the 60's. This was, in part, because kids started going home to watch television instead of hanging out at the corner drug store.
Cars are another reason.
At one time people used to walk downtown and do their shopping. The soda fountain got a lot of foot traffic passing by its doors, with many of those people stopping in for a break. The window displays that drew people into the fountains were often very elaborate works of art. With the advent of cars, people drove to the places they wanted to go, and foot traffic dropped off dramatically. The car and drive-in eateries helped make the soda fountain extinct.