Traditional 當 set 尚 over a field 田: one field matching another in value — equivalence. From 'matching' came 'fitting the role': to serve as, to be the one on duty when something happens.
当老师 to work as a teacher, 当时 at that time, 当然 of course ('as the role demands'). 上当 is to be fooled — legend credits a pawnshop (当铺) that cheated its customers. 当代 means the contemporary era.
One field matching another — fit for the role: SERVE AS; naturally, OF COURSE.
Read dàng, it means proper or to treat-as: 把我当朋友 'treat me as a friend'. And 当当 dāngdāng is the sound of a bell — the character moonlights as onomatopoeia.