When you purchase games over Xbox Live, you are purchasing the rights to play the game. As such, you will need to be logged in to the account used to purchase the game, in order to play it. It is worth considering that you can be logged into an Xbox 360 and an Xbox One on the same account, at the same time. While you could simply use your friends account permanently, there is great risk of the account being blocked, as account sharing is likely against the terms and conditions of making the account.
This is a security measure to ensure what you are asking simply does not happen. At the end of the day, game companies are there to make money. If you could simply log in to an account that had access to download the game, and download it onto a console for everybody to play, they would be losing a lot of money. Especially when you consider that, at one point, the game in question was offered free to all Xbox Gold users.
IIRC an exception to this rule occurs with the "first download" console. The first console the game gets downloaded to, in the past, would allow for other accounts to play the game. I can not confirm if this still works, or if it does, if there are specific titles this supports. However, given that you have reported downloading the game onto your console, it is clear that this would not apply to your case, either way.