You haven't shared the code you are using to complete your tasks. That will allow us to say why it is happening.
However, here is code I would use to sort then delete rows from a table. As you can see, the final table is still sorted in desceding age order.
T = readtable('patients.xls');
T = sortrows(T,"Age",'descend')
T = 100x10 table
LastName Gender Age Location Height Weight Smoker Systolic Diastolic SelfAssessedHealthStatus
____________ __________ ___ _____________________________ ______ ______ ______ ________ _________ ________________________
{'Robinson'} {'Male' } 50 {'County General Hospital' } 68 172 false 125 76 {'Good' }
{'Reed' } {'Male' } 50 {'VA Hospital' } 72 186 true 129 89 {'Excellent'}
{'Brown' } {'Female'} 49 {'County General Hospital' } 64 119 false 122 80 {'Good' }
{'Stewart' } {'Male' } 49 {'County General Hospital' } 68 170 true 129 95 {'Poor' }
{'Hughes' } {'Female'} 49 {'County General Hospital' } 63 123 true 128 96 {'Good' }
{'Griffin' } {'Male' } 49 {'County General Hospital' } 70 186 false 119 74 {'Fair' }
{'Martin' } {'Male' } 48 {'VA Hospital' } 71 181 true 130 92 {'Good' }
{'Clark' } {'Female'} 48 {'VA Hospital' } 65 133 false 121 75 {'Excellent'}
{'Adams' } {'Female'} 48 {'VA Hospital' } 66 137 false 127 83 {'Excellent'}
{'Ramirez' } {'Female'} 48 {'County General Hospital' } 64 137 true 138 82 {'Excellent'}
{'Ross' } {'Female'} 48 {'VA Hospital' } 64 126 false 118 79 {'Good' }
{'Gonzales'} {'Male' } 48 {'County General Hospital' } 71 174 false 123 79 {'Good' }
{'Bryant' } {'Female'} 48 {'County General Hospital' } 66 134 false 129 73 {'Excellent'}
{'Hayes' } {'Male' } 48 {'County General Hospital' } 66 177 false 114 86 {'Fair' }
{'Scott' } {'Male' } 47 {'St. Mary's Medical Center'} 70 187 false 127 84 {'Excellent'}
{'Rogers' } {'Female'} 47 {'VA Hospital' } 66 147 false 117 86 {'Excellent'}
T(T.Age>45,:)=[]
T = 83x10 table
LastName Gender Age Location Height Weight Smoker Systolic Diastolic SelfAssessedHealthStatus
____________ __________ ___ _____________________________ ______ ______ ______ ________ _________ ________________________
{'Anderson'} {'Female'} 45 {'County General Hospital' } 68 128 false 114 77 {'Excellent'}
{'Wright' } {'Female'} 45 {'VA Hospital' } 70 126 true 134 92 {'Excellent'}
{'Phillips'} {'Male' } 45 {'VA Hospital' } 67 172 false 117 89 {'Good' }
{'Bell' } {'Male' } 45 {'St. Mary's Medical Center'} 70 170 true 138 82 {'Good' }
{'Torres' } {'Female'} 45 {'County General Hospital' } 70 137 false 119 79 {'Excellent'}
{'Simmons' } {'Male' } 45 {'VA Hospital' } 71 181 false 124 77 {'Excellent'}
{'Diaz' } {'Male' } 45 {'County General Hospital' } 68 172 true 136 93 {'Good' }
{'Lee' } {'Female'} 44 {'County General Hospital' } 66 146 true 128 90 {'Fair' }
{'Green' } {'Male' } 44 {'County General Hospital' } 71 193 false 121 92 {'Good' }
{'Baker' } {'Male' } 44 {'VA Hospital' } 71 192 true 136 90 {'Good' }
{'Perez' } {'Male' } 44 {'VA Hospital' } 69 183 false 116 80 {'Excellent'}
{'Roberts' } {'Male' } 44 {'VA Hospital' } 70 169 true 132 89 {'Good' }
{'Sanchez' } {'Female'} 44 {'St. Mary's Medical Center'} 62 136 true 130 91 {'Good' }
{'Russell' } {'Male' } 44 {'VA Hospital' } 69 188 true 124 92 {'Good' }
{'Johnson' } {'Male' } 43 {'VA Hospital' } 69 163 false 109 77 {'Fair' }
{'Morris' } {'Female'} 43 {'County General Hospital' } 64 135 true 132 91 {'Poor' }