Probably because your module is outside the MVC scope (i.e. your module has no awareness of any model set to your view / component)
But you can of course always pass a reference to your model into your module:
// your javascript module
sap.ui.define([
"sap/ui/model/json/JSONModel",
], function (JSONModel) {
"use strict";
return {
doSomething : function(oModel) {
// do something with the passed oModel
},
};
});