Not separate brains, of course, but extensions (arrows in image above) of the main mass of their cerebral tissue. The reasons are explained at the Smithsonian's Newsdesk:
Smithsonian researchers report that the brains of tiny spiders are so large that they fill their body cavities and overflow into their legs. As part of ongoing research to understand how miniaturization affects brain size and behavior, researchers measured the central nervous systems of nine species of spiders, from rainforest giants to spiders smaller than the head of a pin. As the spiders get smaller, their brains get proportionally bigger, filling up more and more of their body cavities...Further discussion at the Smithsonian and in the original publication (Arthropod Structure and Development 521-529, doi10.1016/j.asd.2011.07.002).
Brain cells can only be so small because most cells have a nucleus that contains all of the spider’s genes, and that takes up space. The diameter of the nerve fibers or axons also cannot be made smaller because if they are too thin, the flow of ions that carry nerve signals is disrupted, and the signals are not transferred properly. One option is to devote more space to the nervous system...
Photo: Wcislo lab.