It's for emulation, and unfortunately retroarch doesn't allow using mouse as a joystick. I should really just buy a cable for my xbox 360 controllers, but I was looking for a solution in the meantime.
Just as an FYI, if the 360 controllers are wireless, then you cannot plug them in. The port is just for charging if you have a play and charge kit.
You can get knock-off 360 wireless adapters for the PC though and they generally work well.
In case it's relevant, you can plug in Xbox One (and series) controllers via the cable and newer Xbox One (and all Series) controllers can pair wirelessly via Bluetooth.
I think you're gonna have a pretty rough time trying to use a mouse as a joystick
You can get wireless receivers for 360 controllers, joy cons, switch controllers, PS4 and ps5 controllers all work with PC over bluetooth if you have any of those lying around, PS3 ones should work wired with some effort