The function of an aseptic filling machine is to fill containers in a sterile manner, ensuring that there is no microbiological contamination during the packaging process.