It's irregular like "mand/mænd" or "barn/børn".
In the very old days scandinavians used to write on plates of beechwood or "bøg" so that's where we got our word for book. I guess they decided to make a vowel change to avoid confusion thereby making it more confusing for foreigners trying to learn danish.
Mand - Mænd and Bog - Bøger are both examples of I-mutation. Basically the plural forms used to be manniz and bokiz, but because people are lazy they moved A and O to be closer to the I, thus menniz and bøkiz. Eventually the iz suffix was lost entirely, leaving menn and bøk, but bøk had another plural ending added into it, this time the ''er'' ending, but menn was left as is, thus menn and bøker. The spellings mænd and bøger are due to Danish sound changes.
Barn - Børn is an example of U-mutation, based on the same principle (barnu - børnu - børn), which is pretty rare in modern Scandinavian but was common in Old Norse, in ON the plural of land was lønd, but that regularised in Danish to lande. Børn vs barn is probably only preserved because of how common a word barn is.
I've come to the conclusion that trying to speak Danish is like mixing German and French accents with a hint of Gaelic. At least for starters.