bak is a filename extension used to backup copy of a file.
When a program is about to overwrite an existing file the program first make a copy of the existing file, with . bak appended to the filename.
Its used to store a backup of data.
So if any reason your data lost or deleted then you can restore it from bak file.