in a galvanic cell, why is the salt bridge neccisary?
It is not necessary. You can have both electrodes connected in the same container of electrolyte. The reason of using salt bridge is to minimise
interaction between ionic species which may reduce the electrical output of the galvanic cell.
maybe this picture answers your question?
Using the example above, you would observe that Zn
2+ ions would be released into the electrolyte. It cannot interact with Cu
2+ because it is absent in the electrolyte in which the zinc cations are released into.
What do you think are the interactions between Cu
2+ and Zn
2+?
How does presence of Cu
2+ affect the release of Cu
2+ from the Zn electrode?
Is there competition among the cations to be discharged?