There is a relation, but Snowden is not in trouble for his opinion. It's like if somebody has an opinion that robbing rich people is OK, and acts on it, and gets arrested, the arrest would not be for an opinion but for the robbery. The robbery was without doubt related to the opinion, but the opinion is not the base for the prosecution, the specific criminal action based on it is.