Harley Quinn: Huh? What was that? I should kill everyone and escape? Sorry. The voices. Ahaha, I'm kidding! Jeez! That's not what they really said.
The Joker: Would you die for me?
Harley Quinn: Yes.
The Joker: No, no, no. That's too easy... Would you live for me?
The Joker: What do we have here?
Harley Quinn: What you gonna do? You gonna kill me, Mr. J?
The Joker: What? Oh, I'm not gonna kill you. I'm just gonna hurt you. Really, really bad.
Harley Quinn: You think so? Well, I can take it.
Amanda Waller: She was assigned to the clown himself. She thought she was curing him, but she was falling in love.
Captain Boomerang: You know what they say about the crazy ones...
Harley Quinn: Huh?
Rick Flagg: This is the deal: You disobey me, you die. You try to escape, you die. You irritate or vex me... And guess what? You die.
Harley Quinn: I'm known for being quite vexing. I'm just forewarning you.
Answer: Exactly as you said, to show off. He wants them to see he can fire just as accurately at an angle.
lionhead
I am not a gun expert and attempts to search this to verify my point have failed. However, it seems to me that he rotates the rifle to use the secondary sight. While this may be showing off, I assumed this secondary sight was intended to be used for a different range of target, or made a specific type of target easier. When he rotates the gun, it seems he is switching targets. Research has shown that the gun does have 2 sights (DDM4 MK18).
The DDM4 MK18 Deadshot is using has a single red dot sight, nothing "secondary." A gun has only 1 sight, perhaps also a scope, but nothing on the side that requires the gun to be used at an angle. Firing a gun at an angle seriously reduces the accuracy. If there is something attached on the side it's either a flashlight or a laser.
lionhead
If you re-watch the scene, there are very obvious iron sights that he is using that are accessible by tilting the gun sideways. Holding it normal gets you the scope, sideways gets you the iron sights. Not sure what the benefits would be but there are absolutely 2 types of sights on the gun he is using.
oldbaldyone