It would work that way iff there was some other function in GLFW which updated the joystick axes state, such as glfwPollEvents(), but there isn't. Joystick axes state is not sent to the application via window message events, but has to be polled from the device manually and continuously.
I am sure that Escape Analysis will eliminate the allocation of the FloatBuffer instance that is merely mapped to the returned pointer address of the GLFW call if you have the call in a tight loop/method.
You should not be too worried about repeatedly calling that method.