It's rude to masturbate in the presence of others.
Louis is in a position of power and is meeting a person working under him he finds attractive.
Louis wants to show his power.
Louis speaks in a stern voice when giving work instructions to the person he is meeting with and lays out his expectations of their work.
Louis begins to pleasure himself before inviting the person in and positions himself in a way that they see what he is doing.
The person is intimidated by Louis and feels the pressure to perform well which pleases Louis.
Though intimidated at first the person eventually files a police report against Louis, and he loses everything.