This is illustrative of an issue Wade Giles also faced I believe. “Pak-kiann” will basically register as “bak-giann” to an English speaker. But Taiwanese has more possible consonants in the “p” range for example which need to be represented. There’s an aspirated p “represented as 'ph '” much like the English p sound, a harder b sound as represented by p above, which would only appear in English in combination in words like “sapper”, and a softer b sound which is closer to the b in buy. So there’s no prefect answer in terms of using the Roman alphabet for it. I think the Mandarin “b” is closer to the hard “b” sound, and maybe this was more pronounced historically? This could have influenced some of the choices made by WG. I’m not sure how the j-k scenario fits in here, but I suspect something similar. This may be true of Asian languages in general; Thai consonants definitely exhibit this.
It’s interesting that the Taiwanese literary pronunciations reflect a relatively late influx from north China. I forget the exact date range.