The government indicted Ethel, hoping she'd testify against Julius, or that Julius would confess, to spare her. What the government underestimated was the depth of the Rosenbergs' commitment to Communism. Ron Radosh wrote a book about the Rosenbergs, and showed that the Rosenbergs went to their death fully conscious of their status as "martyrs" for the Communist cause.
Very dramatic. However, all's they had to do was confess...but they didn't. They made a decision together to be martyrs. They didn't have to be. In the process their sons suffered for their selfishness/stubbornness/committment to a faux phony idealistic cause called Communism.