They were two seemingly unimportant bills, the kind that clear a committee with little controversy or debate.

But on the floors of the Virginia House of Delegates and Senate last week, two such bills stirred debates that some legislators would say privately was "irresponsible," if not "unsettling."

But not in the public debate of either house. There the debate among the "gentlemen" and "gentlewomen," as the legislators here call themselves, was on a different level. There the catchwords were "local government," "mandates," and the "rights of the people back home."

Somehow, the issues before the legislators - the state's responsibility for care of parentless children and the mentally retarded - were glossed over by the opponents.

In the Senate, Sen. Virgil H. Goode (D-Franklin County), a slender young lawyer with an affinity for populist causes, was telling his colleagues how "I could have climbed under the table" when a county official complained about a state law requiring his county to provide foster care homes for such children.

That night in the House, Del. Richard W. Elliott (D-Campbell), another young lawyer, arose to battle against what he said was "grandmother, the American flag, apple pie, hot dogs and Chevrolets." What angered him was a bill that told Virginia localities they could not use their local zoning powers to restrict the placement of small homes for the mentally retarded in residential neighborhoods.

Elliott and others in the House bitterly charged that the bill represented another attempt by the state to impose yet another mandate on the state's localities and to deny the local governments their right to govern themselves.

The debate is not surprising. It is a theme that emerges every year here and it is not one without some elements of justification, legislators here agree. The state does mandate certain programs on the local governments and these programs do, in fact, force the local governments to do what many public officials dread: Raise taxes.

That is not what some legislators say troubled them about the debates. What worries them was that the opponents of the two measures almost implicitly conceded that their positions probably would hurt Virginia's somewhat limited services for these wards of the State - people who, as Sen. Joseph V. Gartlan (D-Fairfax) was to say later "don't have a constituencey for anything."

Goode offered an amendment to a Gartlan bill on foster care facilities that would have simply "emasculated," in Gartlan's view, the state's current foster care program by stripping from the localities the requirement that they must put up their share of the program's costs. The amendment failed, but by only two votes.

In the House, Elliott appeared on the verge of killing the zoning bill as legislators, many whom had just returned from a lobbyist's wine-and-cheese party, buzzed angrily over the measure. It took Del. Thomas W. Moss (D-Norfolk), a man not known in the House as a champion of social causes, to save the bill.

To kill the bill, he argued, was to condemn the state's retarded to life in huge, impersonal facilities, often out of state, that offer only custodial care at best. By returning the retarded to the small homes in residential neighborhoods, many can undertake small jobs and help the state support them, he said. "Even if it's no more than washing dishes, it's better than sitting on a concrete floor in some other state," he said.

His remarks appeared to end discontent over the measure and it quickly passed, thanks to some swift parliamentary moves by Moss and other supporters of the bill.

Few here believe the issue, the state's responsibility for its own wards, is anywhere near resolved. Last year an appropriation for air conditioning for some of the state's mental hospitals ran into the similar opposition during the final, all-night session of the Assembly. "Well," groused one conservative delegate, "they've gone without air conditioning this long, one more year won't hurt them any."

"Since I have been here, there are two things that I can't understand," said Moss, a Virginia native and a member of the Assembly since 1966. "That's why the hell that bills to help the handicapped and consumer bills always seem to provoke debates."

Because opponents never couch their arguments against such measure in terms of the services the poor would lose, not many legislators like to participate in such debates. "It would be so easy to sit there and say nothing. Nobody would remember, but I can't," said Del. Frank M. Slayton (D-Halifax), who has to argue repeatedly for mental helth improvements in the state.

As mostof the 140 legislators here recognize the issue is fraught with political liabilities. "You get very few votes for trying to protect foster children," Gartlansaid last week.