If not already said, BSF size is one up from BSW, i.e Spanners are often identified as "5/16 BSW / 3/8 BSF"
During WW2, to save material the hexagons sizes were decreased, so that a pre war 1/4 BSW / 5/16 BSF spanner would now fit 5/16 BSW / 3/8 BSF.
The size across flats was decided by a formula related to the nominal thread size.
Unified (And the preceding ANC and ANF, sometimes referred to as Sellars) use an Across flats size which is not related to thread size in this way. In some instances, for convenience,the A/F size will differ from the "norm", posibly one size smaller
Metric fasteners also have A/F sizes supposedly fixed in the same way, so that 13mm spanner usually fits a M8 fixing. But, again variations do occur. Renault used 12mm A/F nuts on 8mm studs to secure the carburretor on the Renault 5, instead of the expected 13mm. I have seen many M6 bolts or setscrews with 8mm heads rather than the ususal 10mm A/F., whilst the associated nuts are 10mm A/F..
A real hybrid combination were the bolts used to secure the Borg and Beck 14AS clutch to the Flywheel of the Gardner 6LW engine in manual transmission Bristol RE buses. These were 5/8 A/F, but with 5/16 BSF threads to suit the still Whit standard Gardner engine! Even worse, the Bell Housing was retained by nine 3/8 BSF bolts, and three studs with 3/8UNF threads!l A fitter's nightmare.
I have to confess that my workshop contains some 17mm A/F nuts with non metric threads, on items that are not intended to be slackened again.
Howard