Firstly, removing the muffler can increase the noise level of your car significantly. While some people may enjoy this louder exhaust note, it can be illegal in certain areas with noise restrictions.
It’s illegal in most places - there are maximum noise and emissions laws. Generally the impact is a small fine and a requirement for fix the vehicle. Depending on where you are, repeat offences could see your licence revoked, vehicle seized or similar sanctions.
On newer cars there are sensors in the exhaust monitoring the exhaust gasses and adjusting engine tuning. The car may go into limp mode or refuse to start at all if you remove these, or they get invalid data.
However, the exhaust gases will be released directly into the environment without any noise or pollution control. This can result in increased emissions, which can be harmful to the environment and may also lead to failing emissions tests or inspections.
Cutting off the muffler can result in a louder and more aggressive sound, potentially improve performance slightly, but also increase emissions and potentially disrupt the balance of the exhaust system.