Sarcomeres are the functional unit of the muscles and the myofibrils are made of sarcomeres. The main function of the myofibrils is to perform muscle contraction.