A man accused of fatally striking his friend with a machete dozens of times later told police he’d fallen in with “very dangerous” people and it was self-defence, a jury has been told.