If you are using a recent version of MAME, high score support was removed. You have to enable savestates so the game saves your state when you exit for next time (and thus saves the high scores).
Remember, the above is only true for games that did not save high scores on power off on the original hardware.
If the original game saved the high score on power off, mame saves it in the nvram folder. If your nvram folder is read only, then mame can't save it even though it tries to. In this case, make your nvram folder writable. (It sounds like this is not the case with SFII, however.)
FYI, there are four cases of saving high scores on original hardware:
- some cabinets saved all high scores on power off,
- some saved part on power off (such as just the top 3, even though there's a "top 10" screen),
- some didn't save any on power off,
- some didn't even have any high scores to save (such as frogger).
Only the middle two cases do savestate (or the hiscore.dat) help AFA saving high scores go.