Urine has a weird smell and sometimes it burns when I pee. This started happening after having anal sex (and vaginal right after by accident)?

Infection. Female urethra where the urine comes out is short and during intercourse it can be rubbed and irritated and a small amount of bacterial can go up the tube and into the bladder and start a urine infection. Going to the bathroom after intercourse sometimes will help resolve the problem. If symptoms persist then seek medical attention.
UTI. You had contamination of your urinary system with bacteria from your rectum due to the sex. Now you have a urinary tract infection. You need to go to the doctor and get treated for this.