The motivation to add that is to be able to specify the tables to improve the output quality because the base tables (use in libjpeg) are far from ideal. With other tables you can achieve prettier result for the same file size. Another motivation could be to experiment with different tables for different purposes.
I could try to do a patch but my C++ is far from good! For the format of the tables (int *basic_table) on the python side, I think it could be an array object or more simpler a string with number separated by any spaces (it's the format use in cjpeg), this way it could be easy to embed tables in code with triple quoted string or read it from a file. You could also copy directly the output of djpeg - v -v. But any format will do the job because it will be easy to write some transform functions from one format to another.