I found the chemistry of borates quite interesting as a chemist. For example, most non-chemists are aware of acids like acetic acid, CH3COOH, where the "OH" loses a proton to give R-O-, etc. Boron is "defective" in a electron (just before carbon in the periodic table, attachment). It effectively adds a hydroxyl to give B(OH)3- plus H+. It ia a very weak acid and as a consequence of adding a OH to give a stable tetrahedral structure, it acquires a negative charge. That is, it can form a complex with any compound with vicinal hydroxyls (hydroxyl groups on adjacent carbons), e.g., polysaccharides. That property can be used to analyze neutral polysaccharides by electrophoresis. The chemistry of its salts is also complex.
As others have said, it is relatively non-toxic to humans. Years ago, it was used to preserve lettuce being shipped to market. However it was discovered to be very toxic to insects. The mechanism is not entirely clear, but it seem to disrupt their digestive system and kills them. That allows them to bring the toxin back to the hive and kill others. Meanwhile pets and children are relatively unaffected (unlike strychnine).
Terro SDS only shows borax, but presumably boric acid is as effective but less soluble in water, and a sweet substance to attract ants (presumably a sugar or glycerol). I was skeptical at first years ago, but it really does work. If you don't want the stickiness, just use borax, which is extremely common as a laundry "amplifier."