Yes it's a coincidence. The characters are completely unrelated.
办 ban4 means "to do, to handle", and it's a phono-semantic compound where the 力 part (strength) conveys the meaning, and the two dots at the sides are a simplification of 辛 (xin1). But the phonetic part when doubled is pronounced bian4. Compare the simplified characters 辩 （as in 辩论）and 辨 （as in 辨别）
班 ban1 means "class, team", and it's a compound ideograph composed of two 玉 （jade）and 刀 （knife）.
To 刀 cut up 玉 pieces of jade and bestow the halfs as rank insignia upon feudatory chiefs (Karlgren)
公 gong1 alone means "official duties" or "public affairs", and is （if I'm not mistaken) also a compound ideograph, from 八 and 厶.
The right 八 division of 厶 private things (Karlgren)
工 gong1 means "work" and is instead a pictogram of an axe (a carpenter square, according to Karlgren). (See picture)