Why are plasmid genes not already incorporated into bacterial chromosomes if necessary for stressful situations?
Plasmids do have the advantage that they replicate independently of the cells chromosome and that they can be transferred between different bacteria. This spreads the gene encoded by the plasmid to other bacteria, which then can also survive.

Think about antibiotic resistance. Bacteria which have a plasmid which allows protection against the antibiotic will survive. They can transfer this protection to other bacteria which then also become resistant. This can either happen through pili which develop between bacteria or also via the uptake of plasmid DNA from the environment in a process called horizontal gene transfer.

Additionally mutations on the plasmids are not as dangerous on the plasmids than on the chromosomal DNA, where essential genes might be damaged. Plasmids can also get lost, if they are not needed by the bacteria due to a missing selection pressure, which is also much harder for genes encoded on the chromosome.