Daniel Khalife joined the Army at 16 because he wanted “to feel what it would like to be free” after an upbringing with a “very, very strict” mother, a court has heard.