Units typically deploy individuals on TDY/TCS for 179 days or less because (if I recall correctly) this is the maximum length allowed by the regulation. By sending you for longer than 180 days it appears entitlements change or it may become a PCS move. I am not sure of the specifics. As far as sending you back and then redeploying you I am not sure that is within the spirit of the regulation–this is the only part of the action that may be questionable.
If the redeployment is not within regulatory guidelines, the unit may have requested an exception to policy for this mission. I believe your best course of action would be to contact the IG and ask them if it is appropriate by regulatory requirements for a unit to send someone TCS/TDY for 179 days and knowingly bring them back only to redeploy them again for 179 days. You can contact the IG directly and in most cases you do not need to provide any personal information for them to assist you.