- What happened? I assume some object to path magic, but why?
I'm not sure. There could be several possibilities: saving in a file format other than "Inkscape SVG", such as PDF, EPS, or some other format. Performing a Path > Object to Path operation, or a Path > Flatten operation before saving, overwriting your original Inkscape SVG by accident.
- Can I restore the font properties? If so, how?
No. When text is converted to paths, the font information is lost permanently. It's destructive and results in data loss. The only way to get editable text back is to delete it, and retype it.
- How can I prevent that from happening?
Keep all text objects as editable text objects, and save your work as an "Inkscape SVG". This is Inkscape's native file format, and this is the only format that preserves all editable objects - not only editable text but also Inkscape-specific functionality such as shape objects, path effects, etc. It contains Inkscape-specific XML within the SVG.
Use this file as your original artwork file. Try not to overwrite it. If you need to create another SVG for output, make sure to choose a new file name so you don't overwrite the original. Alternatively, only use a copy of the file for editing purposes. Sometimes it's even a good idea to apply a read only file attribute to your original artwork file so you can't accidentally overwrite it.