SQLite is more tested (as in code tests) than most other databases. Its downside is that you can essentially only use it from one app at a time, and not over a network.
Also, it is safer than writing to your own files. It has tests for probably all the ways that writing to files can break. So if local state needs to be maintained/changed and written to disk it is great. https://www.sqlite.org/testing.html