If you were to walk into any bar, boutique or bowling alley in the United States and ask people whether the U.S. Marines should stay in Lebanon, the answer almost certainly would be a forceful "no."

In opinion polls, radio call-in shows and letters to their representatives in Washington, the American people have made it clear that they don't understand why American boys are stationed in the line of fire in Beirut and that they think the Marines should be brought home.

If you ask the same question in the Capitol, though, you'll get a different answer. Although members of Congress are seriously divided as to the legal status of the Marine deployment and how long it should continue, only a small minority would vote to bring the troops home now.

Why don't the representatives agree with the people they represent?

The answer seems to lie in a tangled web of pressures, values and instincts that have tugged at the members throughout their three-week-old struggle with President Reagan over continued deployment of the Marine force.

In Congress, Lebanon is not viewed simply as a matter of Americans shedding blood in someone else's war.

Rather, the issue involves strong party loyalties, cherished institutional prerogatives, affection for Israel, enmity toward the Soviet Union and basic political concern about who's going to be blamed if things get worse in Lebanon.

The political back-and-forth has been evident in a series of almost daily barbs between the White House and congressional Democrats.

Reagan and his spokesmen have tried to suggest that the Democrats, by contesting the president's authority to keep the Marines in place, may be endangering them.

The Democrats, in turn, have not missed an opportunity to point out that it was Reagan's idea to dispatch the troops in the first place.

Nonetheless, there has been an effort among some senior House Democrats to play down the political differences. Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), in particular, is a believer in the adage that "politics stops at the water's edge."

One morning a few days back, when the Lebanon dispute was at its peak, a reporter asked O'Neill for an assessment of Reagan's foreign policy.

With a broad smile, the speaker leaped at the bait.

"It's hard to assess a foreign policy," O'Neill began, "that takes one position in one part of the world and the opposite position . . . "--O'Neill broke off in mid-sentence. "At a time when Americans are under fire overseas," he said quietly, "I don't want to get us in a fight on foreign policy."

It was partly that impulse that prompted O'Neill to offer Reagan congressional authorization for him to keep the Marines in Lebanon, with almost no conditions, for another 18 months. Even Republicans in Congress were surprised at O'Neill's accommodation. "The president would be crazy to turn that down," said Senate Republican Whip Ted Stevens (R-Alaska).

O'Neill's proposal caused a mutiny among a sizable faction of House Democrats who thought that their leader had gone much too far. But the agreement between O'Neill and Reagan won the support of many liberal Democrats who would normally be expected to fight tooth and nail against Reagan on a foreign policy issue.

The reason, in a word, is Israel. Israel wants the Marines to remain in Lebanon. And there is a block of House Democrats strongly supportive of Israel.

Accordingly, the proposal to give Reagan virtually a free hand in Lebanon for the next 18 months has the backing of a number of liberal Democrats.

The point was not lost on Secretary of State George P. Shultz, who testified before House and Senate committees last week on the proposed 18-month authorization. In his prepared statement, and in answers to questions--even questions that made no mention of Israel, Shultz repeatedly reminded the legislators that events in Lebanon "must be of concern to Israel."

Nonetheless, Shultz's diplomacy on Capitol Hill was less than completely successful. His testimony has now emerged as one of the chief reasons some members of Congress are opposing the 18-month agreement.

Shultz triggered tempers in Congress by suggesting that Reagan will not be strictly bound by any congressional action on Lebanon. Asked specifically whether the administration would reserve the right, despite the 18-month agreement, to extend the Marine deployment beyond that time period, Shultz essentially said it would.

"I assure you . . . the president would never turn over to Congress his constitutional responsibilities as commander-in-chief," he said.

That statement hit the legislators in an extremely sensitive spot. Almost all members of Congress are fiercely committed to the defense of Congress' constitutional powers, including the power to declare, or not declare, war.

Shultz's comment that the president would feel free to carry out military endeavors regardless of the will of Congress could not have failed to ignite anger in the Capitol.

Accordingly, Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) called the White House yesterday and demanded that somebody write a "clarification" of the Shultz statement. It seems a safe bet that this "clarification" will include some recognition that Congress, too, has a role in foreign policy.

And so the various factions found themselves debating constitutional law, Israeli interests, party leadership and other matters while the Marines in Lebanon continued to take occasional shell fire. It was all too much for Sen. Daniel K. Inouye (D-Hawaii), who took the Senate floor to complain about the course of the debate over the Lebanon deployment.

"This is not a popular political drama designed to entertain and enthrall the audiences of correspondents and columnists," Inouye said. "This is war. Not total, not absolute, not final--but this is war."