What important job does the skull do everytime you bang your head?
Your question contains an amusing misinterpretation. Although some people may informally use the phrase "banging your head" to signify intense concentration or excitement, the skull does not have a specific function related to such an action.
Brain Surgery - Related Articles