As far as I know a riving knife should always be dead flat, so that there are no concerns that it is not exactly in line with the blade.
The fact that it did not cause any problems yet is quite surprising for me.
Me too. I would expect a noticeable tendency for it to try to deflect the workpiece or at least that you'd see increased burning on one side of the cut as it increases rubbing1. But since a riving knife is intended to be thinner than the kerf left by the blade it's possible this has helped to mask the issue.
As to how this might have occurred accidentally it is relatively thin sheet metal that is fixed firmly at one end, just a glancing blow — a slight impact, one gentle enough that you thought nothing about it at the time — could be enough to introduce a bend. I think it's just possible that resting a large, reasonably heavy object on top of it could do it too, such as when manoeuvring a full sheet of plywood into position on top of the saw if you ever remember doing that.
I think the priority should be to contact the saw manufacturer and get their input on this.
If you want to fix it yourself, you should be able to bend this back to straight by hand, working carefully. This may sound sketchy but bending metal by hand is actually standard workshop practice in many places. Wear protective gloves if you need to, but it's likely this has all edges chamfered or rounded so gloves won't be necessary.
Obviously doing the bending carefully can't be stressed enough, since the last thing you want to do is kink it2 or end up with it bent in the opposite direction. So I suggest you bend a little, check, bend a little, check, and occasionally unclamp and check whether it lays flat on your TS's bed. Be patient, this may take longer than you expect!3
You can do the above with the riving knife held in a vice, or clamped to the edge of a workbench; I've unbent metal successfully both ways. If you do have a suitable vice and the bend is localised you might like to investigate what's called three-point bending; generally when I do this I use three long common nails as the bending points (the central 'pin' going on the apex of the bend) but since the riving knife may be mild steel shims of solid wood or plywood are a better idea and should work fine in this situation where you're working with thin metal and only a very slight bend. You can temporarily attach the shims to the vice jaws with masking tape or duct tape.
1 See here on Lumberjocks about that problem, from a different cause, with a SawStop a few years back.
2 I think kinking it is not likely if you're suitably careful, however, kinked hand-saw blades are regularly straightened by gentle hammering so even in the unlikely event of a kink this should also be fixable.
3 A few times I've had to fix bends in both plane irons and cap irons (chipbreakers) to get them back to flat, or close enough. In one case it took well over 15 minutes and could have been closer to half an hour.