This isn't quite right, or at least it's more nuanced than this.
One can in fact work two separate jobs at the same time without it being fraud (the only real "legal" restriction on working two jobs). You can also have two companies pay "you by the hour for the same hour" depending on the circumstances. There isn't a bright line rule that states this or anything, it comes down to whether one is committing fraud (and I agree it could be fraud in many cases, especially if done in secret).
The agent thing falls into the same category, and would depend on fraud and conflict of interest (loyalty, as you mentioned). And you can in fact be an agent of multiple companies or organizations at the same time, but things can get tricky (think of a hypothetical person being the CEO of Twitter and Square at the same time for example).
Your car example is also off the mark, or could be, because it's not a bright line rule. Loyalty to a company in Corporate Law is largely predicated on responsibility to the company via position or duties you've undertaken, and many cases have swung either way, and these can be hard or nuanced questions. Some small facts could change the whole car example, for example perhaps you only sell large vans, but the customer only wants a small convertible. In this case it might be proper for the employee to sell the person their personal Miata. It also doesn't consider higher level employees, executives for instance, and corporate opportunity. RE: "you cannot have two companies paying you by the hour for the same hour", sure you can, depending on the circumstances. Contrived example, but imagine a night security guard being paid to sit at a desk from midnight to eight am whose only responsibility is to have their butt in the seat. It might be okay for them to also be paid for a few hours of handling an online help desk for a third party employer for a couple hours, both being paid by the hour. That person is being paid by the hour by two employers simultaneously and it's not fraud or a breach of loyalty, especially for a hypothetical lower level employee who has permission.
Point is, these are not always easy questions, there is a lot of grey area, and you're really painting the agent and duty of loyalty thing as very black and white concepts when they're definitely not.