This is a good point, and a good question. There are several ways to approach it, but I believe the most simple is that a LEO is always on duty. This is particularly the case with federal law enforcement.
Without altering the direction of the thread here (as apparently I'm wont to do), police officers in general are unique in that they are sworn to uphold the law. Period. Not during assigned duty hours, but period. This places a sworn officer in a different category than many other professions; even closer to soldier, or doctor in certain respects. Without digressing there, a law enforcement officer is obligated to respond to a crisis, and in order to do this, must have tools of the trade. Unfortunately in our society, the option of deadly force is an absolute necessity.
I believe there is little question here that the LEO acted inappropriately. His department head has already apologised for the man's behavior, lending official recognition to the fact that this man was in the wrong.
In this case, the carriage of the weapon on board was at the discretion of the Captain. The captain may have required the USSS agent to remove the weapon and check it, if appropriate means to secure the weapon were available. Admission to the passenger compartment with the weapon appears to have been an issue of generally accepted courtesy.
A longstanding issue in law enforcement has been the need for a national carry policy, especially for off-duty officers. This officer was on duty, it appears. Much like us, where travel not local in nature is part of a duty period, this officer was traveling to a detail. The specifics are not given, but it is not hard to conceive that short notice assignments to fill in, replace, or change plans may be given frequently. As a result, unforecast travel may occur. In such a case, an agent or officer on duty has little choice.
The incident was unfortunate, and hopefully isolated. Most LEO's (every one whom I know, or with whom I've worked) are very professional, just as flight crew members are very professional. One may always find a few "bad apples," just as one might in the cockpit.
I don't see the fact that the weapon was brought on board as being an issue. Rather, I see the fact that an agent prone to such public behavior being allowed to represent the government, as being an important issue deserving greater scrutiny.