Police are investigating the motive behind a man who allegedly murdered his friend before engaging in a tense stand-off with police on top of a two-storey roof.