We have to obey or else we will lose our job. It is a sinful act because it is to collaborate with a sinful law, with a sinful end, destructive of Society. Other examples could be given of false, of sinful obedience. For example, the child disobeying a legitimate order of his parents. These principles apply also inside the Church.
Faith is then greater than obedience.
Obedience is at the service of Faith, not Faith at the service of obedience. The Pope The Society of St Pius X recognises the Pope as the successor of St Peter but reject his liberalism through fidelity to his predecessors. The Pope is not infallible in everything he says. There are very strict conditions which he must follow to fall under the charism of infallibility. One is that he must teach something in matters of faith or morals, another is that he must bind all Catholics to believe what he says as being divinely revealed.