The question is unusual; however, we’d attempt to answer the best way we can.
Familiar with the parable of the Good Samaritan?
“A man was going down from Jerusalem to Jericho when he was attacked by robbers. They stripped him of his clothes, beat him, and went away, leaving him half dead. A priest happened to be going down the same road, and when he saw the man, he passed by on the other side. So too, a Levite, when he came to the place and saw him, passed by on the other side. But a Samaritan, as he traveled, came where the man was; and when he saw him, he took pity on him. He went to him and bandaged his wounds, pouring on oil and wine. Then he put the man on his own donkey, brought him to an inn, and took care of him. 35 The next day, he took out two denarii and gave them to the innkeeper. ‘Look after him,’ he said, ‘and when I return, I will reimburse you for any extra expense you may have.’
“Which of these three do you think was a neighbor to the man who fell into the hands of robbers?”
The expert in the law replied, “The one who had mercy on him.”
Jesus told him, “Go and do likewise.” – Luke 10:30-37
Let us say this priest and the Levite were hurrying to make it to the temple for Sabbath. Do you not think it would be tantamount to sin to abandon this dying man and go to the temple?
God is free, not a robot.
We can never be able to predict how God thinks or how he sees everything. We can only judge from natural laws, scripture, and catechism. And also from the directions of superiors (especially those in religious houses and church hierarchy).
The laws of God do not apply to everyone the very same way because there are very many situations that could alter the way those laws are applied.
For instance, a person who is addicted to drugs and when under the influence commits murder vs. someone who goes to kill another person after days of plotting. Which of these two do you think has more malice in their hearts? The man who acts under the influence and without freedom or the man who freely chooses to kill another?
Answering the question:
There is never a religious act that God is tied to as though He cannot but respond to the act. God is a free being and judges the hearts of all who serve him. No matter how vile a person may appear, he could be God’s favorite and vice versa.
Now, If you want to know if it can ever be wrong to attend a Sunday mass, the answer is obviously no. However, it could be wrong to abandon some very absolutely necessary charitable deed for the sake of the Mass.
When one abandons someone in need of help, especially when we have an obligation towards those people, we have failed to observe the commandment of love.
Let’s say you live alone with your mother, and she’s very ill and cannot take care of herself. Do you know it could be sinful to abandon her by herself because you want to go to Mass? We have to consider our immediate situation to understand what God wants from us here and now.
You could spring for a caregiver, even if it is an hour or two so you can attend Mass, or get a relative to help as well. However, let’s say it’s a sudden thing, on a Sunday morning, someone in your care falls dangerously ill, God requires you to stay and take care of them.
God considers situations, your abilities, and limitations. He understands you wish to be with him at Mass. But if you have a sick person or are sick yourself and incapable of moving, you can stay. But if you are contagious, you MUST stay back for the sake of others.
I think this is the only situation I’d say it could be ‘bad’ to attend Mass since we’d be ignoring a lot, and we run even the risk of losing a life. So when the stakes are that high, we should consider saving lives first.
If you can think of other scenarios, add them below for the benefit of the inquirer.