They were only there because Trump organized that protest and while Trump never told them in direct terms to break in, so that people like you can run interference for him later, he was absolutely delighted when they broke in and took three hours to tell them to go home after being begged and pleaded with by those around him.
At the end of the day they did accomplish what Trump wanted them to do which was delay the certification of the vote. The missing piece of the puzzle was Pence who refused to help Trump stay in power. That is the real story here, that a sitting president tried to prevent the peaceful transfer of power and instead of his party holding him accountable they all lined up behind him to shield him from accountability.